Home > Blockchain >  Creating tick box in Flutter
Creating tick box in Flutter

Time:10-21

How to create such kind of thing in Flutter with possibility of putting a tick?

enter image description here

CodePudding user response:

This kind of thing is called a Checkbox, and like most things, Flutter has a Widget for that.

It's called Checkbox and the Flutter Team has a full live example of how it's used, go to their docs to find out more!

CodePudding user response:

you can use widget called CheckBox and use shape property to make it round

Checkbox(
      checkColor: Colors.white,
      fillColor: MaterialStateProperty.resolveWith(getColor),
      value: isChecked,
      shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(2)),
      onChanged: (bool? value) {
        setState(() {
          isChecked = value!;
        });
      },
    );

here you can check more about Checkbox

  • Related