IDSChipsRadioGroup class
A widget that displays a group of selectable radio button chips.
The IDSChipsRadioGroup widget allows users to select a single option from a list of choices displayed as chips. The selected chip will be highlighted with a distinct background color and text color, while others remain in their normal state.
Example usage:
IDSChipsRadioGroup(
options: ['Option 1', 'Option 2', 'Option 3'],
selectedOption: 'Option 1',
onChanged: (value) => print('Selected: $value'),
);
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- IDSChipsRadioGroup
Constructors
-
IDSChipsRadioGroup.new({Key? key, required List<
String> options, required dynamic onChanged(String), required String selectedOption, double chipsHeight = 40, Color? chipsBorderColor = Colors.grey, Color? chipsSelectedBgColor = Colors.blue, Color? chipsNormalBgColor = Colors.white, Color? selectedTextColor = Colors.white, Color? textColor = Colors.black54, BorderRadius? borderRadius, Axis? scrollDirection}) -
Creates a new instance of IDSChipsRadioGroup.
const
Properties
- borderRadius → BorderRadius?
-
The border radius of the chip.
final
- chipsBorderColor → Color?
-
The border color of the chip when it is not selected.
final
- chipsHeight → double
-
The height of the chips in the group.
final
- chipsNormalBgColor → Color?
-
The background color of the chip when it is not selected.
final
- chipsSelectedBgColor → Color?
-
The background color of the chip when it is selected.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onChanged → dynamic Function(String)
-
A callback function that is called when a new option is selected.
This function receives the selected option as a parameter.
final
-
options
→ List<
String> -
A list of options to be displayed as chips.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollDirection → Axis?
-
The scroll direction of the chip group.
final
- selectedOption → String
-
The currently selected option.
final
- selectedTextColor → Color?
-
The text color of the chip when it is selected.
final
- textColor → Color?
-
The text color of the chip when it is not selected.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → IDSChipsRadioGroupState -
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