MacosRadioButton<T> class

A radio button is a small, circular button followed by a title. Typically presented in groups of two to five, radio buttons provide the user a set of related but mutually exclusive choices. A radio button’s state is either on (a filled circle) or off (an empty circle).

RadioButton example

Inheritance

Constructors

MacosRadioButton({Key? key, required T value, required T? groupValue, required ValueChanged<T?>? onChanged, double size = 16, Color? onColor, Color offColor = CupertinoColors.tertiaryLabel, Color? innerColor, String? semanticLabel})
Creates a radio button.
const

Properties

groupValue → T?
This radio button is considered selected if its value matches the groupValue.
final
hashCode int
The hash code for this object.
no setterinherited
innerColor Color?
The color in the middle. If null, the following colors are used when:
final
isDisabled bool
Whether the button is disabled or not
no setter
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
offColor Color
The color of the border when value is false. CupertinoColors.tertiaryLabel is used by default
final
onChanged ValueChanged<T?>?
Called when value changes. If null, the button will be considered disabled.
final
onColor Color?
The color of the border when value is true. If null, MacosThemeData.primaryColor is used
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selected bool
Whether the button is selected or not.
no setter
semanticLabel String?
The semantic label used by screen readers.
final
size double
The size of the button. Defaults to 16px
final
value → T
Whether the button is checked or not
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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.
override
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