AntdForm class

@t 表单 @g 信息录入 @o 59 @d 高性能表单控件,自带数据域管理。包含数据录入、校验以及对应样式。 @u 适用于创建一个实体或收集信息。需要对输入的数据类型进行校验时。

Inheritance

Constructors

AntdForm({Key? key, AntdBoxStyle? style, AntdStyleBuilder<AntdBoxStyle, AntdForm>? styleBuilder, bool? readOnly, bool? disabled, bool? hasFeedback, AntdFormLayout? layout, bool? preserve, bool? required, AntdFormTrigger? trigger, bool? validateFirst, AntdFormTrigger? validateTrigger, AntdFormController? controller, Map<String, dynamic>? initialValues, required AntdFormBuilder builder, AntdFormFieldsChange? onFieldsChange, AntdFormFinish? onFinish, AntdFormValuesChange? onValuesChange})
const

Properties

builder → AntdFormBuilder
子项
final
controller → AntdFormController?
控制器
finalinherited
disabled → bool?
禁用
finalinherited
hasFeedback → bool?
是否展示错误反馈
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
initialValues → Map<String, dynamic>?
表单默认值,只有初始化以及重置时生效
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
layout → AntdFormLayout?
布局模式
finalinherited
onFieldsChange → AntdFormFieldsChange?
字段更新时触发
final
onFinish → AntdFormFinish?
提交表单且数据验证成功后触发
final
onValuesChange → AntdFormValuesChange?
字段值更新时触发
final
preserve → bool?
当字段被删除时保留字段值
finalinherited
readOnly → bool?
只读
finalinherited
required → bool?
是否必选,需要注意的是这个属性仅仅用来控制外观,并不包含校验逻辑
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
style → AntdBoxStyle?
样式
finalinherited
styleBuilder → AntdStyleBuilder<AntdBoxStyle, AntdForm>?
动态样式
finalinherited
trigger → AntdFormTrigger?
设置收集字段值变更的时机
finalinherited
validateFirst → bool?
当某一规则校验不通过时,是否停止剩下的规则的校验。设置 parallel 时会并行校验
finalinherited
validateTrigger → AntdFormTrigger?
设置字段校验的时机
finalinherited

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<StatefulWidget>
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
getDefaultStyle(BuildContext context, AntdTheme theme, AntdMapToken token) → AntdBoxStyle
override
getFinalStyle(BuildContext context, AntdBoxStyle style, AntdMapToken token) → AntdBoxStyle
inherited
getInputStyle(BuildContext context) → AntdBoxStyle?
inherited
getStyle(BuildContext context) → AntdBoxStyle
inherited
getStyleBuilder(BuildContext context) → AntdStyleBuilder<AntdBoxStyle, AntdForm>?
inherited
getThemeStyle(BuildContext context, AntdTheme theme) → AntdStyleBuilder<AntdBoxStyle, AntdForm>?
override
getWidget(BuildContext context) → AntdForm
override
margeStyle(AntdBoxStyle defaultStyle, AntdBoxStyle? style) → AntdBoxStyle
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, 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