CheckboxGroup class Null safety

Inheritance

Constructors

CheckboxGroup({Key? key, required List<String> labels, List<String>? checked, List<String>? disabled, void onChange(bool isChecked, String label, int index)?, void onSelected(List<String> selected)?, TextStyle labelStyle = const TextStyle(), GroupedButtonsOrientation orientation = GroupedButtonsOrientation.VERTICAL, Widget itemBuilder(Checkbox checkBox, Text label, int index)?, Color? activeColor, Color checkColor = Colors.white, bool tristate = false, EdgeInsetsGeometry padding = EdgeInsets.zero, EdgeInsetsGeometry margin = EdgeInsets.zero})

Properties

activeColor Color?
The color to use when a Checkbox is checked.
final
checkColor Color
The color to use for the check icon when a Checkbox is checked.
final
checked List<String>?
Specifies which boxes to be automatically check. Every element must match a label. This is useful for clearing all selections (set it to []). If this is non-null, then the user must handle updating this list; otherwise, the state of the CheckboxGroup won't change.
final
disabled List<String>?
Specifies which boxes should be disabled. If this is non-null, no boxes will be disabled. The strings passed to this must match the labels.
final
hashCode int
The hash code for this object.
@nonVirtualread-onlyinherited
itemBuilder → (Widget Function?(Checkbox checkBox, Text label, int index)?)
Called when needed to build a CheckboxGroup element.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labels List<String>
A list of strings that describes each Checkbox. Each label must be distinct.
final
labelStyle TextStyle
The style to use for the labels.
final
margin EdgeInsetsGeometry
Empty space surrounding the CheckboxGroup.
final
onChange → (void Function?(bool isChecked, String label, int index)?)
Called when the value of the CheckboxGroup changes.
final
onSelected → (void Function?(List<String> selected)?)
Called when the user makes a selection.
final
orientation GroupedButtonsOrientation
Specifies the orientation to display elements.
final
padding EdgeInsetsGeometry
Empty space in which to inset the CheckboxGroup.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
tristate bool
If true the checkbox's value can be true, false, or null.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _CheckboxGroupState
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.
@protectedinherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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}) 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.
@nonVirtualinherited