I want the 'Remember me' checkbox to be checked not only when the checkbox itself is clicked, but also when the 'Remember me' label is clicked.
How do I check a checkbox when a text widget is clicked?
Actions & Logic
Resolved
I created an app state called 'isRememberMeChecked' with a data type of boolean, persisted set to true, and with a default value of unchecked.
I set the checkbox's initial value to 'isRememberMeChecked'.
For the 'Remember me' text, on tap, I created an 'update app state' action that will toggle the value.
Besides toggling the value, I also tried the 'set value' update type and set it to true if 'isRememberMeChecked' is false, and to false when 'isRememberMeChecked' is true.
None of these worked. Any suggestions on what I should do? I'm new to Flutter and FlutterFlow.
Yes
1
6 replies