I'm using CheckboxListTile, by default the checkbox is to the right of the text. How do I move the checkbox to the left of the text?
My code:
@override
Widget build(BuildContext context) {
return LabeledCheckbox(
label: 'Text of my Checkbox',
padding: const EdgeInsets.symmetric(horizontal: 20.0),
value: _isSelected,
onChanged: (bool newValue) {
setState(() {
_isSelected = newValue;
});
},
);
}
Preview:
CodePudding user response:
To make the checkbox appear on the left of the text, you can wrap your widget with a