释放光标
FocusScope.of(context).unfocus()
输入类型
keyboardType: TextInputType.number,
键盘右下角按键类型
textInputAction: TextInputAction.done,
光标颜色
cursorColor: Colors.orange,
去掉下划线
decoration: InputDecoration(
hintText: '请输入验证码', //placeholder
border: InputBorder.none, //隐藏下划线
),
输入限制
inputFormatters: [
LengthLimitingTextInputFormatter(11) //最多允许输入11位
],