I can't seems to fine a good solution fixing checkboxlisttile in flutter, i'm a complete beginner working with flutter i went through the flutter docs
Please i needed help in understanding this checkboxlisttile thing.
CodePudding user response:
onChanged
provides nullable bool
final ValueChanged<bool?>? onChanged;
onChanged: (bool? value){
isChecked = value ?? false;
}
CodePudding user response:
I assume you want to toggle between true and false upon clicking the CheckBoxListTile
.
Edit the following code inside your onChanged:
onChanged: (bool? value){
isChecked = !isChecked;
}