How to create number input field in Flutter?

后端 未结 14 2105
被撕碎了的回忆
被撕碎了的回忆 2020-12-12 21:47

I\'m unable to find a way to create an input field in Flutter that would open up a numeric keyboard. Is this possible with Flutter material widgets? Some github discussions

14条回答
  •  旧巷少年郎
    2020-12-12 22:10

    You can Easily change the Input Type using the keyboardType Parameter and you have a lot of possibilities check the documentation TextInputType so you can use the number or phone value

     new TextField(keyboardType: TextInputType.number)
    

提交回复
热议问题