postCheckBox function
Widget
postCheckBox(
{ - required String checkBoxText,
- required void onPressed()?,
- required bool value,
})
Implementation
Widget postCheckBox({
required String checkBoxText,
required void Function() ?onPressed,
required bool value,
}){
return MaterialButton(
onPressed: onPressed,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
checkBoxText,
style: defaultTextStyle(),
),
Checkbox(
value: value,
onChanged: (value){
if(onPressed!=null){
onPressed();
}
},
),
],
),
);
}