TxRadioCell<T> class

带有标签的单选按钮。

Inheritance

Constructors

TxRadioCell.new({required Widget label, required T value, required T? groupValue, ValueChanged<T?>? onChanged, Key? key, MouseCursor? mouseCursor, Color? activeColor, MaterialStateProperty<Color?>? fillColor, Color? hoverColor, MaterialStateProperty<Color?>? overlayColor, double? splashRadius, MaterialTapTargetSize? materialTapTargetSize, ListTileControlAffinity? controlAffinity, EdgeInsetsGeometry? padding, bool? toggleable, ShapeBorder? shape, TextStyle? labelStyle, Color? textColor, VisualDensity? visualDensity, Color? focusColor, FocusNode? focusNode, bool? autofocus, bool? useCupertinoCheckmarkStyle})
const

Properties

activeColor Color?
选中此复选框时要使用的颜色。
final
autofocus bool
True if this widget will be selected as the initial focus when no other node in its scope is currently focused.
final
checked bool
是否选中此单选按钮。
no setter
controlAffinity ListTileControlAffinity
相对于文本放置控件的位置。
final
enabled bool
是否允许操作。
no setter
fillColor MaterialStateProperty<Color?>?
填充复选框的颜色。
final
focusColor Color?
单选按钮的 Material 具有输入焦点时的颜色。
final
focusNode FocusNode?
An optional focus node to use as the focus node for this widget.
final
groupValue → T?
当前一组单选按钮选择的值。
final
hashCode int
The hash code for this object.
no setterinherited
hoverColor Color?
The color for the checkbox's Material when a pointer is hovering over it.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label Widget
当前 TxRadioCell 的主要内容。
final
labelStyle TextStyle?
label 的文字样式。
final
materialTapTargetSize MaterialTapTargetSize?
Configures the minimum size of the tap target.
final
mouseCursor MouseCursor?
鼠标指针进入窗口小部件或悬停在 Widget 上时的光标。
final
onChanged ValueChanged<T?>?
当用户选择此单选按钮时调用。
final
overlayColor MaterialStateProperty<Color?>?
复选框的 Material 的颜色。
final
padding EdgeInsetsGeometry?
定义内容周围的内边距。
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape ShapeBorder?
TxRadioCell 的形状
final
splashRadius double?
The splash radius of the circular Material ink response.
final
textColor Color?
文字的颜色
final
toggleable bool
如果允许此单选按钮在选中时再次选择,将其返回到不确定状态,则设置为 true。
final
useCupertinoCheckmarkStyle bool
控制是否在 iOS 样式的单选按钮中使用复选标记样式。
final
value → T
此单选按钮表示的值。
final
visualDensity VisualDensity?
Defines how compact the radio's layout will be.
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.
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