Checkbox class

A material-design checkbox that toggles between checked (✓) and unchecked states.

Responds to KeyCode.space and KeyCode.enter to toggle. Wrap in Focus to enable keyboard navigation.

Inheritance

Constructors

Checkbox({Key? key, required bool value, ValueChanged<bool?>? onChanged, bool tristate = false, FocusNode? focusNode, Color? activeColor, Color? checkColor})
Creates a Checkbox with the given value and optional onChanged.
const

Properties

activeColor Color?
The color of the filled checkbox when checked.
final
checkColor Color?
The color of the check mark inside the box.
final
focusNode FocusNode?
An optional focus node for keyboard navigation.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another in the tree.
finalinherited
onChanged ValueChanged<bool?>?
Called when the user toggles the checkbox.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tristate bool
Whether the checkbox supports a third "null" state.
final
value bool
Whether the checkbox is currently checked.
final

Methods

createElement() StatefulElement
Creates the Element for this widget.
inherited
createState() State<Checkbox>
Creates the mutable state for this widget.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited