BrnInputText class
根据输入内容动态算高 为了解决text输入的时候高度计算的问题 支持设置最大最小高度 支持设置输入最大字数限制 支持最大最小行数限制
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- BrnInputText
- Available Extensions
Constructors
- BrnInputText({BrnInputTextChangeCallback? onTextChange, BrnInputTextSubmitCallback? onSubmit, double maxHeight = 200, double minHeight = 50, Color bgColor = Colors.white, int maxLength = 200, int minLines = 1, String? hint, int? maxHintLines, EdgeInsetsGeometry padding = EdgeInsets.zero, String textString = "", bool? autoFocus, TextEditingController? textEditingController, FocusNode? focusNode, TextInputAction textInputAction = TextInputAction.done, double? borderRadius, Color? borderColor})
Properties
- autoFocus → bool?
-
光标展示
final
- bgColor → Color
-
整个容器的背景颜色,默认 Colors.white
final
- borderColor → Color?
-
边框颜色
final
- borderRadius → double?
-
背景圆角
final
- focusNode → FocusNode?
-
搜索框的焦点控制器
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hint → String?
-
输入框的hint文字,默认为"请输入..."
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- maxHeight → double
-
容器的最大高度,默认 200
final
- maxHintLines → int?
-
最大hint行数
final
- maxLength → int
-
最大字数,默认200
final
- minHeight → double
-
最小的高度,默认 50
final
- minLines → int
-
最少几行,默认1
final
- onSubmit → BrnInputTextSubmitCallback?
-
点击确定后的回调
final
- onTextChange → BrnInputTextChangeCallback?
-
搜索框输入内容改变时候的回调函数
final
- padding → EdgeInsetsGeometry
-
文字距离边框的边距,默认 EdgeInsets.zero
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- textEditingController → TextEditingController?
-
用于对 TextField 更精细的控制,若传入该字段,textString 参数将失效,可使用 TextEditingController.text 进行赋值。
final
- textInputAction → TextInputAction
-
键盘输入行为, 默认为 TextInputAction.done
final
- textString → String
-
输入框的初始值,默认为""
不能定义为String,兼容example调用的传值
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}) → 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