OudsCheckbox class

An OUDS Checkbox component as per the design guidelines of OUDS.

This widget represents a parent checkbox, which can have a parent-child relationship with other checkboxes. When the parent checkbox is checked, all child checkboxes are also checked. If the parent checkbox is unchecked, all child checkboxes are unchecked. If some, but not all, child checkboxes are checked, the parent checkbox becomes an indeterminate checkbox.

The following parameters are available:

  • value: Controls checked state of the checkbox.
  • onChanged: Callback invoked when the checkbox is clicked, requesting a change in the ToggleableState. If null, the checkbox will be in a non-interactive state, meaning it will not respond to user interactions and its state will be entirely controlled by a higher-level component. In this case, the checkbox will not change its state when clicked, and the visual representation will remain static. If provided, the callback will be invoked with the new state when the checkbox is clicked.
  • tristate: If true, the checkboxes value can be true, false, or null. If false, only true and false states are managed.
  • isError: Controls the error state of the checkbox.

See also: OudsCheckboxSample for usage example.

Inheritance

Constructors

OudsCheckbox.new({Key? key, required bool? value, required ValueChanged<bool?>? onChanged, bool isError = false, bool tristate = false})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
isError bool
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onChanged ValueChanged<bool?>?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tristate bool
final
value bool?
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<OudsCheckbox>
Creates the mutable state for this widget at a given location in the tree.
override
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