bool isChecked = false;
Checkbox(
value: isChecked,
onChanged: (value) {
setState(() {
isChecked = value!;
});
},
),
CheckboxListTile(
title: Text("title text"),
value: checkedValue,
onChanged: (newValue) {
setState(() {
checkedValue = newValue;
});
},
controlAffinity: ListTileControlAffinity.leading, // <-- leading Checkbox
)
bool _value = true;
Checkbox(
value: _value,
onChanged: (bool newValue) {
setState(() {
_value = newValue;
});
},
)