I added an AlertDialog
, in which a Checkbox
is, but if I tap on the Checkbox
, it doesn´t get a hook. I also added another Checkbox
below the AlertDialog
and this one gets a hook by clicking on it. I think it has something with setState()
to do, but I don´t know. Does anybody knowes a solution? Thanks in advance
ListTile(
title: Text("Test"),
trailing: Icon(Icons.fitness_center),
onTap: () {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text("Test"),
content: Column(
children: <Widget>[
Row(
children: <Widget>[
Checkbox(
value: checkBoxValueTheraband,
onChanged: (bool value) {
setState(() {
checkBoxValueTheraband = value;
exerciseChooser();
});
},
),
Text("Theraband"),
],
),),);});})