render method
Implementation
Widget render() {
return SizedBox(
height: 110,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
child: Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [
SizedBox(
child: Row(children: [
if (label != null)
Flexible(
child: SizedBox(
child: Text("$label ${isMandatory == true ? "* " : ""}", textAlign: TextAlign.left, style: TextStyle(color: Colors.black.withValues(alpha: 0.8))),
),
),
if (openPanel != null)
InkWell(
child: MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
onTap: () {
openPanel!(
panelChild,
label,
);
},
child: Container(
width: 17,
height: 17,
padding: const EdgeInsets.all(2),
decoration: BoxDecoration(
border: Border.all(
color: Theme.of(context).colorScheme.primary,
),
borderRadius: BorderRadius.circular(100)),
child: Icon(Icons.question_mark, color: Theme.of(context).colorScheme.primary, size: 10)))))
]),
),
const SizedBox(
height: 10,
),
SizedBox(
height: 75,
child: renderSelect(),
)
]),
),
if (addButtonCallback != null)
const SizedBox(
width: 12,
),
if (addButtonCallback != null)
Padding(
padding: const EdgeInsets.only(top: 12),
child: InkWell(
onTap: () {
addButtonCallback!();
},
child: MouseRegion(cursor: SystemMouseCursors.click, child: GestureDetector(child: Icon(Icons.add, color: Theme.of(context).colorScheme.primary)))),
)
],
),
],
),
);
}