zoukankan      html  css  js  c++  java
  • 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, // 点击时回调
    })

  • 相关阅读:
    ★★★
    ★★
    小狼程序员:工作遐想
    广联达BB了
    计算机网络简单理解
    做个合格的(优秀的)测试开发人员
    开发、测试、测试开发
    8.21
    C++ 选择题总结(回调函数 || 类方法(实例方法)|| )
    深拷贝实现笔记
  • 原文地址:https://www.cnblogs.com/zxh1919/p/13220933.html
Copyright © 2011-2022 走看看