AntdFormItem class

@t 表单项 @g 信息录入 @o 59 @d 与表单搭配使用,只是属性太多单独列出来了

Inheritance

Constructors

AntdFormItem.new({Key? key, AntdFormItemStyle? style, AntdStyleBuilder<AntdFormItemStyle, AntdFormItem>? styleBuilder, bool? readOnly, bool? disabled, bool? hasFeedback, AntdFormLayout? layout, bool? preserve, bool? required, AntdFormTrigger? trigger, bool? validateFirst, AntdFormTrigger? validateTrigger, Widget? help, Widget helpIcon = const AntdIcon(icon: AntdIcons.questionCircle), bool? hidden, dynamic initialValue, AntdFormItemChange? onChange, Widget? label, required String name, List<String>? dependencies, AntdFormItemNormalize? normalize, List<AntdFormRule>? rules, Widget? extra, required AntdFormItemBuilder builder, AntdFormItemLayoutBuilder? layoutBuilder, AntdFormItemShouUpdate? shouUpdate})
const

Properties

builder AntdFormItemBuilder
内容
final
controller AntdFormController?
控制器
finalinherited
dependencies List<String>?
依赖的字段信息
final
disabled bool?
禁用
finalinherited
extra Widget?
右侧扩展区
final
hasFeedback bool?
是否展示错误反馈
finalinherited
hashCode int
The hash code for this object.
no setterinherited
help Widget?
提示文本
final
helpIcon Widget
提示图标
final
hidden bool?
是否隐藏整个字段
final
initialValue → dynamic
设置子元素默认值,如果与 Form 的 initialValues 冲突则以 Form 为准
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label Widget?
标签名
final
layout AntdFormLayout?
布局模式
finalinherited
layoutBuilder AntdFormItemLayoutBuilder?
自定义布局
final
name String
字段名,嵌套的路径如 "user.address.city"
final
normalize AntdFormItemNormalize?
组件获取值后进行转换,再放入 Form 中。不支持异步
final
onChange AntdFormItemChange?
数据改变时调用
final
preserve bool?
当字段被删除时保留字段值
finalinherited
readOnly bool?
只读
finalinherited
required bool?
是否必选,需要注意的是这个属性仅仅用来控制外观,并不包含校验逻辑
finalinherited
rules List<AntdFormRule>?
校验规则,设置字段的校验逻辑
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouUpdate AntdFormItemShouUpdate?
更新判断函数
final
style AntdFormItemStyle?
样式
finalinherited
styleBuilder AntdStyleBuilder<AntdFormItemStyle, AntdFormItem>?
动态样式
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) AntdFormItemStyle
override
getFinalStyle(BuildContext context, AntdFormItemStyle style, AntdMapToken token) AntdFormItemStyle
inherited
getInputStyle(BuildContext context) AntdFormItemStyle?
inherited
getStyle(BuildContext context) AntdFormItemStyle
inherited
getStyleBuilder(BuildContext context) AntdStyleBuilder<AntdFormItemStyle, AntdFormItem>?
inherited
getThemeStyle(BuildContext context, AntdTheme theme) AntdStyleBuilder<AntdFormItemStyle, AntdFormItem>?
override
getWidget(BuildContext context) AntdFormItem
override
margeStyle(AntdFormItemStyle defaultStyle, AntdFormItemStyle? style) AntdFormItemStyle
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