英文:
how we use mobile keyboard key event in flutter?
问题
- 
我可以在点击手机键盘上的回车键时使用键盘事件,并跳转到下一个编辑文本框,然后到另一个提交按钮。
 - 
我试图获取用户手机键盘按键事件,但我不知道在Flutter中用于此事件的方法是什么。
问题 我可以使用数字作为键盘的输入类型,但无法获取按键事件。 
英文:
- 
I can use key Event when use click the phone keyboard enter key and go to next Edit Text and next to another submit button.
 - 
I am trying to get the user phone keyboard key click event but I don't know what is method use for this event in flutter.
Problem I can use the input type method for keyboard as numeric but I can not get the key event. 
答案1
得分: 0
如果您在键盘按钮上设置了一些基本功能,那么您可以尝试这种方法
通过TextInputAction更改事件
- TextInputAction.done
 - TextInputAction.search
 - TextInputAction.continueAction
 - TextInputAction.emergencyCall
 
以及更多..........
TextFormField(
  maxLines: 1,
  autovalidateMode: AutovalidateMode.always,
  textInputAction: TextInputAction.done,
),
英文:
if you set some basic functions on keyboard button so you can try this method
change event by TextInputAction
- TextInputAction.done
 - TextInputAction.search
 - TextInputAction.continueAction
 - TextInputAction.emergencyCall
 
and more.........
TextFormField(
  maxLines: 1,
  autovalidateMode: AutovalidateMode.always,
  textInputAction: TextInputAction.done,
),
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论