TFormRow class

Implemented types

Constructors

TFormRow({String? tag, String type = TFormRowTypeInput, Widget widgetBuilder(BuildContext, TFormRow)?, Widget suffixWidget(BuildContext, TFormRow)?, Widget? widget, dynamic state, int? maxLength, String title = "", String value = "", bool require = false, bool requireStar = false, bool enabled = true, String placeholder = "", String? requireMsg, List? options, void onChanged(TFormRow)?, Future onTap(BuildContext, TFormRow)?, bool validator(TFormRow)?, TFormFieldConfig? fieldConfig, TextInputType? keyboardType, OverlayVisibilityMode clearButtonMode = OverlayVisibilityMode.editing, bool? obscureText, TextAlign textAlign = TextAlign.right, int? maxLines, DateMode? mode})
TFormRow.customCell({String? tag, String title = "", Widget? widget, bool require = false})
TFormRow.customCellBuilder({String? tag, dynamic state, String title = "", Widget widgetBuilder(BuildContext, TFormRow)?, bool require = false, String? requireMsg, bool validator(TFormRow)?})
TFormRow.customSelector({String? tag, dynamic state, String title = "", String value = "", String placeholder = "请选择", bool require = false, bool requireStar = false, bool enabled = true, String? requireMsg, List? options, Future onTap(BuildContext, TFormRow)?, bool validator(TFormRow)?, TFormFieldConfig? fieldConfig, Widget suffixWidget(BuildContext, TFormRow)?, TextAlign textAlign = TextAlign.right})
自定义选择器,配合 state 定义自己的数据 onTap 点击事件
TFormRow.input({String? tag, String title = "", String value = "", String placeholder = "请输入", bool require = false, bool requireStar = false, bool enabled = true, String? requireMsg, void onChanged(TFormRow)?, bool validator(TFormRow)?, Widget suffixWidget(BuildContext, TFormRow)?, int? maxLength, TFormFieldConfig? fieldConfig, TextInputType? keyboardType, OverlayVisibilityMode clearButtonMode = OverlayVisibilityMode.editing, bool? obscureText, dynamic state, TextAlign textAlign = TextAlign.left, int? maxLines})
输入
TFormRow.multipleSelector({String? tag, String title = "", String value = "", String placeholder = "请选择", bool require = false, bool requireStar = false, bool enabled = true, String? requireMsg, List? options, bool validator(TFormRow)?, TFormFieldConfig? fieldConfig, Widget suffixWidget(BuildContext, TFormRow)?, TextAlign textAlign = TextAlign.right})
多选
TFormRow.selector({String? tag, String title = "", String value = "", String placeholder = "请选择", bool require = false, bool requireStar = false, bool enabled = true, String? requireMsg, List? options, bool validator(TFormRow)?, TFormFieldConfig? fieldConfig, Widget suffixWidget(BuildContext, TFormRow)?, TextAlign textAlign = TextAlign.right})
单选
TFormRow.timeSelect({String? tag, String title = "", String value = "", String placeholder = "请选择", bool require = false, bool requireStar = false, bool enabled = true, String? requireMsg, List? options, bool validator(TFormRow)?, TFormFieldConfig? fieldConfig, Widget suffixWidget(BuildContext, TFormRow)?, TextAlign textAlign = TextAlign.right, DateMode? mode})
时间选择

Properties

animation bool
标记插入删除操作是否显示动画
getter/setter pair
clearButtonMode OverlayVisibilityMode
清除按钮显示模式
getter/setter pair
enabled bool
是否能编辑
getter/setter pair
fieldConfig TFormFieldConfig?
textfield 样式配置
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
keyboardType TextInputType?
键盘类型
getter/setter pair
maxLength int?
输入框长度限制
getter/setter pair
maxLines int?
输入的最大行数
getter/setter pair
mode ↔ DateMode?
时间选择类型
getter/setter pair
obscureText bool?
输入框内容是否加密
getter/setter pair
onChanged ↔ (void Function(TFormRow)?)
输入事件
getter/setter pair
onTap ↔ (Future Function(BuildContext, TFormRow)?)
点击事件
getter/setter pair
options List?
选择类型的选项,可以是纯字符串,也可以是 TFormOptionModel 对象
getter/setter pair
placeholder String
输入框占位
getter/setter pair
require bool
是否必填
getter/setter pair
requireMsg String?
必填项校验不通过提示
getter/setter pair
requireStar bool
必填项是否显示 * 号
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state ↔ dynamic
自定义 widget 对应的 state
getter/setter pair
suffixWidget ↔ (Widget Function(BuildContext, TFormRow)?)
通过 builder 的方式自定义 suffixWidget
getter/setter pair
tag String?
唯一标识
getter/setter pair
textAlign TextAlign
输入框文字对齐方式
getter/setter pair
title String
标题
getter/setter pair
type String
类型
getter/setter pair
validator ↔ (bool Function(TFormRow)?)
自定义校验规则
getter/setter pair
value String
选择类型或者输入类型的值
getter/setter pair
widget Widget?
自定义 Cell
getter/setter pair
widgetBuilder ↔ (Widget Function(BuildContext, TFormRow)?)
通过 builder 的方式自定义 Cell
getter/setter pair

Methods

clone() TFormRow
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited