RadioGroup class

By st merlHin from DexCorp A class to ease the creation of Radio button with Text

Inheritance

Constructors

RadioGroup({Key? key, GroupItemsAlignment groupItemsAlignment = GroupItemsAlignment.row, required ValueChanged<int> onSelectionChanged, int defaultSelectedItem = 0, required List<Widget> children, bool textBeforeRadio = true, EdgeInsetsGeometry padding = const EdgeInsets.all(0), EdgeInsetsGeometry margin = const EdgeInsets.all(0), Color? activeColor, Color? focusColor, Color? hoverColor, bool textBelowRadio = true, RadioPriority priority = RadioPriority.textBeforeRadio, MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start, MainAxisAlignment internMainAxisAlignment = MainAxisAlignment.start})
const

Properties

activeColor Color?
The color to use when this radio button is selected.
final
children List<Widget>
The list of the items of the RadioGroup. It's good to pass a list of Text
final
defaultSelectedItem int
The default item to select for the RadioGroup
final
focusColor Color?
The color for the radio's Material when it has the input focus.
final
groupItemsAlignment GroupItemsAlignment
The alignment of the Radio Items. It can be GroupItemsAlignment.row or GroupItemsAlignment.column
final
hashCode int
The hash code for this object.
no setterinherited
hoverColor Color?
The color for the radio's Material when a pointer is hovering over it.
final
internMainAxisAlignment MainAxisAlignment
the internal axis alignment of the RadioGroup
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
mainAxisAlignment MainAxisAlignment
The main axis alignment of the RadioGroup
final
margin EdgeInsetsGeometry
Empty space to surround the children.
final
onSelectionChanged ValueChanged<int>
Callback called when the selected item changed it returns the index of the selected radio. note that the index start at 0.
final
padding EdgeInsetsGeometry
Empty space to inscribe inside the RadioGroup. The children, if any, is placed inside this padding.
final
priority RadioPriority
Tells if the textBelowRadio is important or not than textBeforeRadio
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textBeforeRadio bool
Tells if the Text must come before or after the radio button
final
textBelowRadio bool
Tells if the Text must be below or above the Radio
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
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}) 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