BrnPortraitRadioGroup class
纵向放置的单选 radio 视图。选项可为单行字符串,也可是标题+说明两部分。具体参见 BrnPortraitRadioGroupOption。 选项的标题/子标题文字样式分别通过 BrnFormItemConfig.optionTextStyle 和 BrnFormItemConfig.subTitleTextStyle 控 制,可通过主题配置进行修改。
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- BrnPortraitRadioGroup
- Available Extensions
Constructors
-
BrnPortraitRadioGroup.withOptions({Key? key, bool isEdit = true, BrnPortraitRadioGroupOption? selectedOption, List<
BrnPortraitRadioGroupOption> ? options, List<bool> ? enableList, BrnPortraitRadioGroupOnChanged? onChanged, bool isCollapseContent = false, BrnFormItemConfig? themeData}) - 通过 BrnPortraitRadioGroupOption 类型的数组 options,构造纵向单选视图。
-
BrnPortraitRadioGroup.withSimpleList({Key? key, bool isEdit = true, String selectedOption = "", required List<
String> options, List<bool> ? enableList, BrnPortraitRadioGroupOnChanged? onChanged, BrnFormItemConfig? themeData, bool isCollapseContent = false}) -
通过传入一个字符串数组
options
,快捷构造出单行选项文案的纵向单选视图。
Properties
-
enableList
→ List<
bool> ? -
备选项可用状态数组
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isCollapseContent → bool
-
options 中 title subTitle 是否换行展示。
false: 换行展示
true: 只展示一行,一行展示不下末尾
...
省略展示 默认值为 falsefinal - isEdit → bool
-
录入项内容是否可编辑,false 时全部选项置灰,默认为 true。
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onChanged → BrnPortraitRadioGroupOnChanged?
-
选项变化回调
final
-
options
→ List<
BrnPortraitRadioGroupOption> ? -
备选项数组,参数类型为
BrnPortraitRadioGroupOption
final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedOption → BrnPortraitRadioGroupOption?
-
初始化时默认选中的项,匹配逻辑是 BrnPortraitRadioGroupOption.title 和 BrnPortraitRadioGroupOption.subTitle 都相等。
final
- themeData ↔ BrnFormItemConfig?
-
主题配置数据
getter/setter pair
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → BrnPortraitRadioGroupState -
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