WFormBorder class

WFormBorder 组件是一个表单边框容器,用于为表单输入添加统一的边框样式和错误提示

该组件支持以下特性:

  • 可配置的边框样式(颜色、宽度、圆角)
  • 支持只读状态和错误状态
  • 支持透明背景
  • 支持提示文本和错误文本
Inheritance
Available extensions

Constructors

WFormBorder({Key? key, WFormBorderConfig? config, required Widget child, List<String>? hintTextList, bool? isReadOnly, bool? isTransparentBackground, bool? isFocused})
创建表单边框容器
const

Properties

child → Widget
子组件
final
config → WFormBorderConfig?
边框配置(为 null 时继承祖先 WFormBuilder.formBorderConfig)
final
hashCode → int
The hash code for this object.
no setterinherited
hintTextList → List<String>?
提示文本列表
final
isFocused → bool?
是否聚焦
final
isReadOnly → bool?
是否只读
final
isTransparentBackground → bool?
是否透明背景
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
notificationListenerBuilder → WNotificationListenerBuilder<Notification>

Available on Widget, provided by the WNotificationListenerBuilderExtension extension

创建 WNotificationListenerBuilder 实例
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<WFormBorder>
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
expanded([int flex = 1]) → Widget

Available on Widget, provided by the WWidgetExtension extension

将 Widget 包装在 Expanded 中
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toButton({GestureTapCallback? onTap, GestureLongPressCallback? onLongPress, WButtonConfig? config}) → Widget

Available on Widget, provided by the WUiWidgetExtension extension

将 Widget 包装在 WButton 中
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
withBottomPadding(double padding) → Widget

Available on Widget, provided by the WWidgetExtension extension

添加底部 padding
withBottomSafeSpace() → Widget

Available on Widget, provided by the WWidgetExtension extension

添加底部安全空间(适配底部导航栏)
withBottomSpace(double height) → Widget

Available on Widget, provided by the WWidgetExtension extension

添加自定义底部空间
withContainer(WContainerConfig config) → Widget

Available on Widget, provided by the WUiWidgetExtension extension

将 Widget 包装在 Container 中
withHorizontalPadding(double padding) → Widget

Available on Widget, provided by the WWidgetExtension extension

添加水平 padding
withLeftPadding(double padding) → Widget

Available on Widget, provided by the WWidgetExtension extension

添加左侧 padding
withRightPadding(double padding) → Widget

Available on Widget, provided by the WWidgetExtension extension

添加右侧 padding
withTopPadding(double padding) → Widget

Available on Widget, provided by the WWidgetExtension extension

添加顶部 padding
withTopSafeSpace() → Widget

Available on Widget, provided by the WWidgetExtension extension

添加顶部安全空间(适配状态栏)
withVerticalPadding(double padding) → Widget

Available on Widget, provided by the WWidgetExtension extension

添加垂直 padding

Operators

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