CustomRadioButton<T> class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CustomRadioButton
Constructors
-
CustomRadioButton({Key? key, required List<
String> buttonLables, required List<T> buttonValues, ButtonTextStyle buttonTextStyle = const ButtonTextStyle(), bool autoWidth = false, required void radioButtonValue(T), required Color unSelectedColor, Color? unSelectedBorderColor, double padding = 3, double spacing = 0.0, required Color selectedColor, Color? selectedBorderColor, double height = 35, double width = 100, bool enableButtonWrap = false, bool horizontal = false, bool enableShape = false, double elevation = 10, double shapeRadius = 50, double radius = 20, T? defaultSelected, ShapeBorder? customShape, ScrollController? scrollController, bool absoluteZeroSpacing = false, EdgeInsetsGeometry? margin, WrapAlignment wrapAlignment = WrapAlignment.start, List<T> disabledValues = const [], Color? disabledColor}) -
spacing
Spacing between buttons
Properties
- absoluteZeroSpacing → bool
-
This option will make sure that there is no spacing in between buttons
final
- autoWidth → bool
-
Only applied when in vertical mode
This will use minimum space required
If enables it will ignore width field
final
-
final
-
Styling class for label
final
-
Values of button
final
- customShape → ShapeBorder?
-
A custom Shape can be applied (will work only if enableShape is true)
final
- defaultSelected → T?
-
Default selected value
final
- disabledColor → Color?
-
Disabled Color of button
If not provided will use unSelectedColor
final
-
disabledValues
→ List<
T> -
List of disabled values
final
- elevation → double
-
final
- enableButtonWrap → bool
-
This will enable button wrap (will work only if orientation is vertical)
final
- enableShape → bool
-
if true button will have rounded corners
If you want custom shape you can use customShape property
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
Default value is 35
final
- horizontal → bool
-
Orientation of the Button Group
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- margin → EdgeInsetsGeometry?
-
Margins around card
final
- padding ↔ double
-
latefinal
- radioButtonValue → void Function(T)
-
final
- radius → double
-
Radius for non-shape radio button
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController?
-
final
- selectedBorderColor → Color?
-
Selected Color of button border
final
- selectedColor → Color
-
Selected Color of button
final
- shapeRadius → double
-
Radius for shape radio button
final
- spacing ↔ double
-
Spacing between buttons
latefinal
- unSelectedBorderColor → Color?
-
Unselected Color of the button border
final
- unSelectedColor → Color
-
Unselected Color of the button
final
- width → double
-
Use this if you want to keep width of all the buttons same
final
- wrapAlignment → WrapAlignment
-
alignment for button when enableButtonWrap is true
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → CustomRadioButtonState< T> -
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