mardi 23 août 2022

LabeledCheckbox (Checkbox) on the left side of the text in Flutter?

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:

enter image description here




Aucun commentaire:

Enregistrer un commentaire