custom_radio_grouped_button
custom flutter widgets that makes checkbox and radio buttons much cleaner and easier.
installing
add the following to your pubspec.yaml
file:
dependencies:
custom_radio_grouped_button: any
creating radio button
customradiobutton(
buttoncolor: theme.of(context).canvascolor,
buttonlables: [
"student",
"parent/teacher",
],
buttonvalues: [
"student",
"teacher",
],
radiobuttonvalue: (value) => print(value),
selectedcolor: theme.of(context).accentcolor,
);
creating grouped button
customcheckboxgroup(
buttoncolor: theme.of(context).canvascolor,
buttonlables: [
"monday",
"tuesday",
"wednesday",
"thursday",
],
buttonvalueslist: [
"monday",
"tuesday",
"wednesday",
"thursday",
],
checkboxbuttonvalues: (values) => print(values),
defaultselected: "monday",
horizontal: true,
width: 120,
selectedcolor: theme.o.accentcolor,
padding: 5,
);
Comments are closed.