CheckboxGroup class
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.
no setter inherited
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.
final inherited
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.
no setter inherited
tristate
→ bool
If true the checkbox's value can be true, false, or null.
final