CupertinoCheckbox constructor
- Key? key,
- required bool? value,
- bool tristate = false,
- required ValueChanged<
bool?> ? onChanged, - Color? activeColor,
- Color? inactiveColor,
- Color? checkColor,
- Color? focusColor,
- FocusNode? focusNode,
- bool autofocus = false,
- BorderSide? side,
- OutlinedBorder? shape,
Creates a macOS-styled 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.
The following arguments are required:
Implementation
const CupertinoCheckbox({
super.key,
required this.value,
this.tristate = false,
required this.onChanged,
this.activeColor,
this.inactiveColor,
this.checkColor,
this.focusColor,
this.focusNode,
this.autofocus = false,
this.side,
this.shape,
}) : assert(tristate || value != null);