AuiCheckbox class
A customisable checkbox widget that wraps Flutter's built-in Checkbox.
Supports two-state (checked / unchecked) and three-state (checked / unchecked / indeterminate) modes. When a label is provided the label text is tappable and also triggers onChanged.
Example – basic usage:
AuiCheckbox(
value: _checked,
onChanged: (v) => setState(() => _checked = v),
label: 'Accept terms',
)
Example – indeterminate / select-all pattern:
AuiCheckbox(
tristate: true,
value: null, // null = indeterminate
onChanged: _handleSelectAll,
label: 'Select all',
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- AuiCheckbox
Constructors
-
AuiCheckbox({Key? key, required bool? value, required ValueChanged<
bool?> ? onChanged, String? label, CheckboxLabelPosition labelPosition = CheckboxLabelPosition.right, Color? activeColor, Color checkColor = Colors.white, bool disabled = false, bool tristate = false}) -
Creates an AuiCheckbox.
const
Properties
- activeColor → Color?
-
The color used for the checkbox background when it is checked or
indeterminate.
final
- checkColor → Color
-
The color of the check mark / dash drawn inside the checkbox.
final
- disabled → bool
-
Whether the checkbox (and its label) ignores all user input.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String?
-
Optional text label displayed next to the checkbox.
final
- labelPosition → CheckboxLabelPosition
-
Where the label is rendered relative to the checkbox.
final
-
onChanged
→ ValueChanged<
bool?> ? -
Called when the user taps the checkbox or its label.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tristate → bool
-
When
truethe checkbox supports a third, indeterminate state represented by value beingnull.final - value → bool?
-
The current value of the checkbox.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited