Ive got a custom CheckBox widget where it returns a label and a checkbox field,
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(16.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(widget.label, style: Theme.of(context).textTheme.headline4),
Checkbox(
activeColor: LightSeaGreen,
checkColor: White,
value: _checkbox,
onChanged: (value) {
setState(() {
_checkbox = !_checkbox;
});
widget.onChanged(value);
},
),
],
),
);
}
So right now,It looks like this,
what I want is for the checkboxes to align to the right like this
Ive tried the Align fuction,Spacer,MainAxisAlignment.spaceBetween but nothing works
please help me
Aucun commentaire:
Enregistrer un commentaire