Create terms & conditions like CheckBox in Flutter
1 min read

Create terms & conditions like CheckBox in Flutter

To create a check box for agreeing Terms & Conditions in Flutter, use the following code.

bool _isChecked = false;

CheckboxListTile(
  title: Text('I would like to receive promotional emails and updates from App Name about new features, products, and special offers.'),
  controlAffinity: ListTileControlAffinity.leading,
  value: _isChecked,
  onChanged: (bool value) {
    setState(() {
      _isChecked = value;
    });
  },
);

controlAffinity is used to determine where the CheckBox should be placed.