SilTextField class

输入框

Inheritance

Constructors

SilTextField({Key? key, required dynamic onValid(bool valid, String value), required SilFormattersInterface interface, double? height = 44, InputDecoration? inputDecoration, int? maxLines = 1, String? hintText, TextStyle? textStyle, double? rowSpace, bool? showClearBtn = true, TextAlign? textAlign = TextAlign.start, int? min, int? max, String? text, bool? isObscure = false, TextInputAction? textInputAction = TextInputAction.next, dynamic onSubmitted(String value)?, bool? enabled, dynamic onEditingComplete()?, dynamic onClick()?, bool requestFocus = false})

Properties

enabled bool?
是否可以输入
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
height double?
高度
getter/setter pair
hintText String?
候选装饰
getter/setter pair
inputDecoration InputDecoration?
getter/setter pair
interface SilFormattersInterface
代理,需要实现 提供几种常用实现类 SilFormattersPhone 手机号 SilFormattersPhoneCode 手机验证码 SilFormattersPwd 密码 SilFormattersNickName 用户昵称
getter/setter pair
isObscure bool?
密文输入
getter/setter pair
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
max int?
最大限制字数
getter/setter pair
maxLines int?
行数,默认1行
getter/setter pair
min int?
最小限制字数
getter/setter pair
onClick ↔ dynamic Function()?
点击事件
getter/setter pair
onEditingComplete ↔ dynamic Function()?
编辑完成
getter/setter pair
onSubmitted ↔ dynamic Function(String value)?
提交
getter/setter pair
onValid ↔ dynamic Function(bool valid, String value)
valid:输入框内容是否有效 value:输入框内容
getter/setter pair
requestFocus bool
请求焦点
getter/setter pair
rowSpace double?
输入框右侧与叉叉左侧 距离,默认12
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showClearBtn bool?
显示清除按扭 ,默认true显示
getter/setter pair
text String?
默认
getter/setter pair
textAlign TextAlign?
对齐方式 ,默认左对齐
getter/setter pair
textInputAction TextInputAction?
文本输入动作
getter/setter pair
textStyle TextStyle?
输入文本style
getter/setter pair

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<SilTextField>
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