checkBox function
Checkbox with text message
value of checkbox checked
(true, false)
text
message follow by the checkbox
onChange
function onChange(value) to track the checkbox true false value
Implementation
checkBox(bool checked, String text, Function(bool?)? onChange) {
return Row(
children: [
Padding(
padding: const EdgeInsets.only(right: 4.0, top: 4.0, bottom: 4.0),
child: SizedBox(
width: 24,
height: 24,
child: Checkbox(value: checked, onChanged: onChange)),
),
Expanded(child: Text("$text")),
],
);
}