CustomInput class
Input 输入框组件
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- CustomInput
Constructors
-
CustomInput({Key? key, TextEditingController? controller, String? initialValue, FocusNode? focusNode, TextInputType? keyboardType, TextCapitalization textCapitalization = TextCapitalization.none, TextInputAction? textInputAction, TextStyle? style, StrutStyle? strutStyle, TextDirection? textDirection, TextAlign textAlign = TextAlign.start, TextAlignVertical? textAlignVertical, bool autofocus = false, bool readOnly = false, bool? showCursor, String obscuringCharacter = '*', bool obscureText = false, bool autocorrect = true, SmartDashesType? smartDashesType, SmartQuotesType? smartQuotesType, bool enableSuggestions = true, MaxLengthEnforcement? maxLengthEnforcement, int? maxLines = 1, int? minLines, bool expands = false, int? maxLength, ValueChanged<
String> ? onChanged, GestureTapCallback? onTap, TapRegionCallback? onTapOutside, ValueChanged<String> ? onFieldSubmitted, FormFieldSetter<String> ? onSaved, FormFieldValidator<String> ? validator, List<TextInputFormatter> ? inputFormatters, bool? enabled, double cursorWidth = 2.0, double? cursorHeight, Radius? cursorRadius, Color? cursorColor, Brightness? keyboardAppearance, EdgeInsets scrollPadding = const EdgeInsets.all(20.0), bool? enableInteractiveSelection, TextSelectionControls? selectionControls, InputCounterWidgetBuilder? buildCounter, ScrollPhysics? scrollPhysics, Iterable<String> ? autofillHints, ScrollController? scrollController, String? restorationId, bool enableIMEPersonalizedLearning = true, MouseCursor? mouseCursor, SpellCheckConfiguration? spellCheckConfiguration, TextMagnifierConfiguration? magnifierConfiguration, UndoHistoryController? undoController, AppPrivateCommandCallback? onAppPrivateCommand, bool? cursorOpacityAnimates, BoxHeightStyle selectionHeightStyle = BoxHeightStyle.tight, BoxWidthStyle selectionWidthStyle = BoxWidthStyle.tight, DragStartBehavior dragStartBehavior = DragStartBehavior.start, ContentInsertionConfiguration? contentInsertionConfiguration, Clip clipBehavior = Clip.hardEdge, bool stylusHandwritingEnabled = true, bool canRequestFocus = true, AutovalidateMode? autovalidateMode = AutovalidateMode.onUserInteraction, InputDecoration? decoration, CustomInputSize size = CustomInputSize.middle, bool useCameraScanner = false, bool showBorder = false, bool? clearable, VoidCallback? onClear, bool? inListTile = false}) -
Input 输入框组件
const
Properties
- autocorrect → bool
-
自动纠正
final
-
autofillHints
→ Iterable<
String> ? -
自动填充提示
final
- autofocus → bool
-
自动获取焦点
final
- autovalidateMode → AutovalidateMode?
-
自动验证模式
final
- buildCounter → InputCounterWidgetBuilder?
-
计数器构建器
final
- canRequestFocus → bool
-
可请求焦点
final
- clearable → bool?
-
清除
final
- clipBehavior → Clip
-
裁剪方式
final
- contentInsertionConfiguration → ContentInsertionConfiguration?
-
内容插入配置
final
- controller → TextEditingController?
-
文本编辑控制器
final
- cursorColor → Color?
-
光标颜色
final
- cursorHeight → double?
-
光标高度
final
- cursorOpacityAnimates → bool?
-
光标透明度动画
final
- cursorRadius → Radius?
-
光标圆角
final
- cursorWidth → double
-
光标宽度
final
- decoration → InputDecoration?
-
装饰
final
- dragStartBehavior → DragStartBehavior
-
拖动开始行为
final
- enabled → bool?
-
启用状态
final
- enableIMEPersonalizedLearning → bool
-
启用输入法个性化学习
final
- enableInteractiveSelection → bool?
-
启用文本选择交互
final
- enableSuggestions → bool
-
启用建议
final
- expands → bool
-
扩展模式
final
- focusNode → FocusNode?
-
焦点节点
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialValue → String?
-
初始值
final
- inListTile → bool?
-
在 ListTile 中
final
-
inputFormatters
→ List<
TextInputFormatter> ? -
输入格式化器
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- keyboardAppearance → Brightness?
-
键盘外观
final
- keyboardType → TextInputType?
-
键盘类型
final
- magnifierConfiguration → TextMagnifierConfiguration?
-
放大器配置
final
- maxLength → int?
-
最大长度
final
- maxLengthEnforcement → MaxLengthEnforcement?
-
最大长度限制类型
final
- maxLines → int?
-
最大行数
final
- minLines → int?
-
最小行数
final
- mouseCursor → MouseCursor?
-
鼠标指针
final
- obscureText → bool
-
密码模式
final
- obscuringCharacter → String
-
密码掩码字符
final
- onAppPrivateCommand → AppPrivateCommandCallback?
-
私有命令回调
final
-
onChanged
→ ValueChanged<
String> ? -
文本变化回调
final
- onClear → VoidCallback?
-
清除回调
final
-
onFieldSubmitted
→ ValueChanged<
String> ? -
提交回调
final
-
onSaved
→ FormFieldSetter<
String> ? -
保存回调
final
- onTap → GestureTapCallback?
-
点击回调
final
- onTapOutside → TapRegionCallback?
-
点击外部回调
final
- readOnly → bool
-
只读模式
final
- restorationId → String?
-
恢复 ID
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController?
-
滚动控制器
final
- scrollPadding → EdgeInsets
-
滚动内边距
final
- scrollPhysics → ScrollPhysics?
-
滚动物理特性
final
- selectionControls → TextSelectionControls?
-
选择控制器
final
- selectionHeightStyle → BoxHeightStyle
-
选择区域高度样式
final
- selectionWidthStyle → BoxWidthStyle
-
选择区域宽度样式
final
- showBorder → bool
-
显示边框
final
- showCursor → bool?
-
显示光标
final
- size → CustomInputSize
-
输入框大小
final
- smartDashesType → SmartDashesType?
-
智能破折号类型
final
- smartQuotesType → SmartQuotesType?
-
智能引号类型
final
- spellCheckConfiguration → SpellCheckConfiguration?
-
拼写检查配置
final
- strutStyle → StrutStyle?
-
文本支撑样式
final
- style → TextStyle?
-
文本样式
final
- stylusHandwritingEnabled → bool
-
启用涂鸦
final
- textAlign → TextAlign
-
文本对齐
final
- textAlignVertical → TextAlignVertical?
-
文本垂直对齐
final
- textCapitalization → TextCapitalization
-
文本大写
final
- textDirection → TextDirection?
-
文本方向
final
- textInputAction → TextInputAction?
-
键盘操作按钮类型
final
- undoController → UndoHistoryController?
-
撤销控制器
final
- useCameraScanner → bool
-
使用相机扫描
final
-
validator
→ FormFieldValidator<
String> ? -
验证器
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
-
toScanner(
BuildContext context) → Future< void> - 跳转扫描
-
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