Checkbox constructor
const
Checkbox({
- Key? key,
- bool? value,
- bool tristate = false,
- ValueChanged<
bool?> ? onChanged, - FocusNode? focusNode,
- bool autofocus = false,
- CheckboxThemeData? theme,
- bool forceEnabled = false,
Creates a Checkbox.
Implementation
const Checkbox({
super.key,
this.value,
this.tristate = false,
this.onChanged,
this.focusNode,
this.autofocus = false,
this.theme,
this.forceEnabled = false,
}) : assert(tristate || value != null),
assert(!forceEnabled || onChanged == null,
'Cannot have `onChanged` when `forceEnabled` is true');