I am trying to create a bottom sheet with checkboxes. I'm finding it difficult to get the checkboxes to be checked and show a different colour once tapped. At the moment the checkbox just stays empty.
How would I solve this?
bool isChecked = false;
...
Column(
children: <Widget>[
Padding(
padding: const EdgeInsets.fromLTRB(50, 10, 10, 10),
child: Row(
children: <Widget>[
Expanded(child: Text('Classes Booked')),
Checkbox(
checkColor: isChecked
? Colors.grey
: Theme.of(context).colorScheme.aqua,
value: isChecked,
onChanged: (bool value) {
setState(() {
value = true;
});
},
),
Aucun commentaire:
Enregistrer un commentaire