YaruCheckbox constructor
const
YaruCheckbox({
- Key? key,
- required bool? value,
- bool tristate = false,
- required ValueChanged<
bool?> ? onChanged, - Color? selectedColor,
- Color? checkmarkColor,
- FocusNode? focusNode,
- bool autofocus = false,
- MouseCursor? mouseCursor,
- MaterialStatesController? statesController,
A Yaru 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.
Implementation
const YaruCheckbox({
super.key,
required this.value,
this.tristate = false,
required this.onChanged,
this.selectedColor,
this.checkmarkColor,
this.focusNode,
this.autofocus = false,
this.mouseCursor,
this.statesController,
}) : assert(tristate || value != null);