Flutter TextField 文本输入框的基本属性及详解
const TextField({
Key key,
this.controller, // 控制正在编辑文本
this.focusNode, // 获取键盘焦点
this.decoration = const InputDecoration(), // 边框装饰
TextInputType keyboardType, // 键盘类型
this.textInputAction, // 键盘的操作按钮类型
this.textCapitalization = TextCapitalization.none, // 配置大小写键盘
this.style, // 输入文本样式
this.textAlign = TextAlign.start, // 对齐方式
this.textDirection, // 文本方向
this.autofocus = false, // 是否自动对焦
this.obscureText = false, // 是否隐藏内容,例如密码格式
this.autocorrect = true, // 是否自动校正
this.maxLines = 1, // 最大行数
this.maxLength, // 允许输入的最大长度
this.maxLengthEnforced = true, // 是否允许超过输入最大长度
this.onChanged, // 文本内容变更时回调
this.onEditingComplete, // 提交内容时回调
this.onSubmitted, // 用户提示完成时回调
this.inputFormatters, // 验证及格式
this.enabled, // 是否不可点击
this.cursorWidth = 2.0, // 光标宽度
this.cursorRadius, // 光标圆角弧度
this.cursorColor, // 光标颜色
this.keyboardAppearance, // 键盘亮度
this.scrollPadding = const EdgeInsets.all(20.0), // 滚动到视图中时,填充边距
this.enableInteractiveSelection, // 长按是否展示【剪切/复制/粘贴菜单LengthLimitingTextInputFormatter】
this.onTap, // 点击时回调
})
相关文章
- SpriteBuilder中pivot关节中的Collide bodies属性
- 基本线程同步(三)在同步的类里安排独立属性
- SpringBoot注解把配置文件自动映射到属性和实体类实战
- 教程-Delphi中Spcomm使用属性及用法详解
- List集合中的对象根据属性排序
- android 属性动画
- SAP Spartacus powertools-spa site在Commerce Cloud后台的属性
- Angular元素属性绑定的一个例子
- 说下readyState属性是干嘛的,都有哪几个状态
- Qt setAttribute设置窗口属性
- 以Java属性文件的格式创建Hibernate的配置文件和DTD特殊符号作用
- listview android:cacheColorHint,android:listSelector属性作用(转)
- deepface:最先进轻量级人脸识别和人脸属性分析框架讲解