Checkbox({Key key, @required bool value, @required ValueChanged<bool> onChanged, Color activeColor })

Creates a material design checkbox.

The checkbox itself does not maintain any state. Instead, when the state of the checkbox changes, the widget calls the onChanged callback. Most widgets that use a checkbox will listen for the onChanged callback and rebuild the checkbox with a new value to update the visual appearance of the checkbox.

  • value determines whether the checkbox is checked.
  • onChanged is called when the value of the checkbox should change.

Source

Checkbox({
  Key key,
  @required this.value,
  @required this.onChanged,
  this.activeColor
}) : super(key: key);