TDInputView class

Inheritance

Constructors

TDInputView({Key? key, required TextStyle textStyle, bool readOnly = false, bool autofocus = false, bool obscureText = false, VoidCallback? onEditingComplete, ValueChanged<String>? onSubmitted, String? hintText = '', TextInputType? inputType, ValueChanged<String>? onChanged, List<TextInputFormatter>? inputFormatters, InputDecoration? inputDecoration, int? maxLines, FocusNode? focusNode, TextStyle? hintTextStyle, Color? cursorColor, Color? textInputBackgroundColor, EdgeInsetsGeometry contentPadding = EdgeInsets.zero, bool isCollapsed = false, TextAlign? textAlign, TextEditingController? controller})
const

Properties

autofocus bool
是否自动获取焦点
final
contentPadding EdgeInsetsGeometry
textInput内边距
final
controller TextEditingController?
controller 用户获取或者赋值输入内容
final
cursorColor Color?
游标颜色
final
focusNode FocusNode?
获取或者取消焦点使用
final
hashCode int
The hash code for this object.
no setterinherited
hintText String?
提示文案
final
hintTextStyle TextStyle?
提示文本颜色,默认为文本颜色
final
inputDecoration InputDecoration?
自定义输入框样式,默认圆角
final
inputFormatters List<TextInputFormatter>?
显示输入内容,如限制长度(LengthLimitingTextInputFormatter(6))
final
inputType TextInputType?
键盘类型,数字、字母
final
isCollapsed bool
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxLines int?
最大输入行数
final
obscureText bool
是否隐藏输入的文字,一般用在密码输入框中
final
onChanged ValueChanged<String>?
输入文本变化时回调
final
onEditingComplete VoidCallback?
点击键盘完成按钮时触发的回调
final
onSubmitted ValueChanged<String>?
点击键盘完成按钮时触发的回调, 参数值为输入的内容
final
readOnly bool
是否只读
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textAlign TextAlign?
文本对齐方向
final
textInputBackgroundColor Color?
文本框背景色
final
textStyle TextStyle
文本颜色
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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, 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