AppCheckbox class

A Material Design checkbox with optional label.

Provides a customizable checkbox that integrates with the app theme and supports labels, error states, and indeterminate state.

Inheritance

Constructors

AppCheckbox({Key? key, required bool? value, required ValueChanged<bool?>? onChanged, String? label, CheckboxLabelPosition labelPosition = CheckboxLabelPosition.right, bool tristate = false, String? error, bool enabled = true, Color? activeColor, Color? checkColor, double? borderRadius, TextStyle? labelStyle, Color? borderColor, double? borderWidth, WidgetStateProperty<Color?>? fillColor})
Creates a checkbox.
const

Properties

activeColor Color?
The color to use when this checkbox is checked.
final
borderColor Color?
Optional border color.
final
borderRadius double?
Optional border radius for the checkbox.
final
borderWidth double?
Optional border width.
final
checkColor Color?
The color to use for the check icon.
final
enabled bool
Whether the checkbox is enabled.
final
error String?
Optional error message to display below the checkbox.
final
fillColor WidgetStateProperty<Color?>?
Optional fill color (overrides active/inactive backgrounds).
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 label text to display next to the checkbox.
final
labelPosition CheckboxLabelPosition
The position of the label relative to the checkbox.
final
labelStyle TextStyle?
Optional text style for the label.
final
onChanged ValueChanged<bool?>?
Called when the value of the checkbox should change.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tristate bool
If true, the checkbox's value can be true, false, or null.
final
value bool?
Whether this checkbox is checked.
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