Answers for "flutter checkbox on click"

6

checkbox in flutter

CheckboxListTile(
    title: Text("title text"),
    value: checkedValue,
    onChanged: (newValue) { 
                 setState(() {
                   checkedValue = newValue; 
                 }); 
               },
    controlAffinity: ListTileControlAffinity.leading,  //  <-- leading Checkbox
  )
Posted by: Guest on August-13-2020
1

flutter checkbox

bool _value = true;

Checkbox(
  value: _value,
  onChanged: (bool newValue) {
    setState(() {
      _value = newValue;
    });
  },
)
Posted by: Guest on January-23-2021

Code answers related to "Dart"

Browse Popular Code Answers by Language