[英]Flutter showing only 0-9 keypad instead of extended number keypad when using text input (i.e. all ascii characters should be available)
In my flutter app, I cannot get the full numeric keypad (0-9 + "top row" characters like,,@,# etc) to appear, even when using在我的 flutter 应用程序中,即使使用
keyboardType: TextInputType.text
I've included screenshots below of what I want vs. what I get.我在下面包含了我想要的与我得到的截图。
When I open the keyboard in flutter in iOS
当我在 iOS 中打开 flutter 中的键盘时
I Get This
我明白了
But I Want This
但我想要这个
This is my code
这是我的代码
TextField(
key: key,
style: textStyle,
textAlign: TextAlign.center,
controller: textFieldController,
cursorColor: selectedColor,
keyboardType: TextInputType.text,
onChanged: onChanged )
I would suggest trying to run the app without specifying the keyboardtype.我建议尝试在不指定键盘类型的情况下运行该应用程序。 When I recreated the text field and specified the keyboardtype to textinputtype.text, I also got the same output, but when I ran the app without specifying the keyboardtype my keyboard was fine.
当我重新创建文本字段并将键盘类型指定为 textinputtype.text 时,我也得到了相同的 output,但是当我在未指定键盘类型的情况下运行应用程序时,我的键盘很好。 This is my first contribution, so please let me know if it fixed the issue for you.
这是我的第一个贡献,如果它为您解决了问题,请告诉我。
The Fix修复
flutter channel
flutter通道
be sure you are on stable (I was on master)确保您处于稳定状态(我在 master 上)
flutter --version
flutter --版本
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.