Home > Blockchain >  I added checkbox in flutter but it can't clickable
I added checkbox in flutter but it can't clickable

Time:08-13

I added checkbox but it can't click please tell me reason

enter image description here

CodePudding user response:

You need to declare variables outside the build method. Else on every state-changes, it will get the same value being inside the method.

bool isChecked = false;

@override
Widget build(BuildContext context){

 return ...

More about StatefulWidget

  • Related