TDTextarea class
用于多行文本信息输入
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- TDTextarea
Constructors
-
TDTextarea({Key? key, double? width, TextStyle? textStyle, Color? backgroundColor, Decoration? decoration, TextStyle? labelStyle, bool? required, bool? readOnly = false, bool? autofocus = false, VoidCallback? onEditingComplete, ValueChanged<
String> ? onSubmitted, String? hintText, TextInputType? inputType, ValueChanged<String> ? onChanged, List<TextInputFormatter> ? inputFormatters, InputDecoration? inputDecoration, int? maxLines, int? minLines = 4, FocusNode? focusNode, TextEditingController? controller, Color? cursorColor, TextStyle? hintTextStyle, Widget? labelWidget, Color? textInputBackgroundColor, TDInputSize? size = TDInputSize.large, int? maxLength, MaxLengthEnforcement? maxLengthEnforcement, bool? allowInputOverMax = false, String? additionInfo = '', Color? additionInfoColor, TextAlign? textAlign, String? label, bool? indicator = false, TDTextareaLayout? layout = TDTextareaLayout.horizontal, bool? autosize, Widget? labelIcon, double? labelWidth, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, Decoration? textareaDecoration, bool? bordered, bool? showBottomDivider = true}) -
const
Properties
- additionInfo → String?
-
错误提示信息
final
- additionInfoColor → Color?
-
错误提示颜色
final
- allowInputOverMax → bool?
-
超出maxLength之后是否还允许输入
final
- autofocus → bool?
-
是否自动获取焦点
final
- autosize → bool?
-
是否自动增高,值为 true 时,maxLines不生效
final
- backgroundColor → Color?
-
输入框背景色
final
- bordered → bool?
-
是否显示外边框
final
- controller → TextEditingController?
-
controller 用户获取或者赋值输入内容
final
- cursorColor → Color?
-
游标颜色
final
- decoration → Decoration?
-
输入框样式(包括标签)
final
- focusNode → FocusNode?
-
获取或者取消焦点使用
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hintText → String?
-
提示文案
final
- hintTextStyle → TextStyle?
-
提示文本颜色,默认为文本颜色
final
- indicator → bool?
-
否显示文本计数器,如 0/140(必须设置maxLength)
final
- inputDecoration → InputDecoration?
-
自定义输入框TextField组件样式
final
-
inputFormatters
→ List<
TextInputFormatter> ? -
显示输入内容,如限制长度(LengthLimitingTextInputFormatter(6))
final
- inputType → TextInputType?
-
键盘类型,数字、字母
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String?
-
输入框标题
final
- labelIcon → Widget?
-
输入框标题图标
final
- labelStyle → TextStyle?
-
左侧标签文本样式
final
- labelWidget → Widget?
-
label组件,支持自定义
final
- labelWidth → double?
-
输入框标题宽度
final
- layout → TDTextareaLayout?
-
标题输入框布局方式。可选项:vertical/horizontal
final
- margin → EdgeInsetsGeometry?
-
外边距
final
- maxLength → int?
-
最大字数限制
final
- maxLengthEnforcement → MaxLengthEnforcement?
-
如何执行输入长度限制
final
- maxLines → int?
-
最大输入行数
final
- minLines → int?
-
最小输入行数
final
-
onChanged
→ ValueChanged<
String> ? -
输入文本变化时回调
final
- onEditingComplete → VoidCallback?
-
点击键盘完成按钮时触发的回调
final
-
onSubmitted
→ ValueChanged<
String> ? -
点击键盘完成按钮时触发的回调, 参数值为输入的内容
final
- padding → EdgeInsetsGeometry?
-
内边距
final
- readOnly → bool?
-
是否只读
final
- required → bool?
-
是否必填标志(红色*)
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showBottomDivider → bool?
-
边框外部下划线
final
- size → TDInputSize?
-
输入框规格
final
- textAlign → TextAlign?
-
文字对齐方向
final
- textareaDecoration → Decoration?
-
输入框样式(不包括标签)
final
- textInputBackgroundColor → Color?
-
文本框背景色
final
- textStyle → TextStyle?
-
文本颜色
final
- width → double?
-
输入框宽度
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _TDTextareaState -
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, 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