简体   繁体   English

如何在带有 Flutter/Dart 的 Samsung Galaxy 上的 TextField 中使用逗号代替点

[英]How to use comma instead dot in TextField on Samsung Galaxy with Flutter/Dart

I want to build a TextField for numbers in Flutter/Dart.我想在 Flutter/Dart 中为数字构建一个 TextField。

For decimal numbers, I want to use commas instead of dot ( = Germany).对于十进制数,我想使用逗号而不是点(= 德国)。

在此处输入图片说明

I detected the problem with Samsung Galaxy S5 and S6.我检测到三星 Galaxy S5 和 S6 的问题。

On other Smartphones with GBoard installed, there is both, command and dot, available.在其他安装了 GBoard 的智能手机上,可以使用 command 和 dot。

Does anyone else have this problem?还有其他人有这个问题吗?

keyboardType:键盘类型:

TextInputType.numberWithOptions(decimal: true,),

Adding extra row to the android default keyboard is not possible for this you have to go to the custom keyboard.向 android 默认键盘添加额外的行是不可能的,因此您必须转到自定义键盘。

You can check custom keyboard example here您可以在此处查看自定义键盘示例

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM