CustomRadioBtn class

A customizable radio button group widget supporting horizontal and vertical layouts.

CustomRadioBtn displays a group of selectable buttons with custom labels, values, colors, shapes, and elevation. It allows for both row and column arrangements, and notifies the parent widget of selection changes via a callback. The widget supports enabling/disabling all buttons and customizing the selected and unselected button appearance.

Example usage:

CustomRadioBtn(
  buttonLables: ['Option 1', 'Option 2'],
  buttonValues: [1, 2],
  radioButtonValue: (value) => print(value),
  buttonColor: Colors.grey,
  selectedColor: Colors.blue,
  defaultValue: 'Option 1',
  horizontal: false,
  enableAll: true,
)
Inheritance

Constructors

CustomRadioBtn({Key? key, List<String>? buttonLables, List? buttonValues, dynamic radioButtonValue(dynamic)?, Color? buttonColor, Color? selectedColor, String? defaultValue, double? hight = 35, double? width = 100, bool? horizontal = false, bool? enableShape = false, double? elevation = 4, ShapeBorder? customShape, bool? enableAll})

Properties

buttonColor Color?
final
buttonLables List<String>?
final
buttonValues List?
final
customShape ShapeBorder?
final
defaultValue String?
final
elevation double?
final
enableAll bool?
final
enableShape bool?
final
hashCode int
The hash code for this object.
no setterinherited
hight double?
final
horizontal bool?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
radioButtonValue → dynamic Function(dynamic)?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedColor Color?
final
width double?
final

Methods

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