We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如题,在你的Demo例子上, TextField( decoration: InputDecoration(labelText: '演示键盘弹出后滚动'), keyboardType: NumberKeyboard.inputType, onSubmitted: (txt){ print('aaaaaaaa'); }, ), TextField( decoration: InputDecoration(labelText: '多个键盘演示'), keyboardType: TestKeyboard.inputType, onSubmitted: (txt){ print('bbbbbbb'); }, ) 加上onSubmitted,当键盘弹出时,按返回键,就会自动促发onSubmitted
TextField( decoration: InputDecoration(labelText: '演示键盘弹出后滚动'), keyboardType: NumberKeyboard.inputType, onSubmitted: (txt){ print('aaaaaaaa'); }, ), TextField( decoration: InputDecoration(labelText: '多个键盘演示'), keyboardType: TestKeyboard.inputType, onSubmitted: (txt){ print('bbbbbbb'); }, )
The text was updated successfully, but these errors were encountered:
这个是flutter自带的效果
Sorry, something went wrong.
如上面所提到的, onSubmitted问题. 安卓物理返回键会触犯onSubmitted. 但跟踪代码好像是内部处理物理返回键 // BackButtonInterceptor.add((_) { // CoolKeyboard.sendPerformAction(TextInputAction.done); // return true; // }, zIndex: 1, name: 'CustomKeyboard'); } // BackButtonInterceptor.removeByName('CustomKeyboard');
// BackButtonInterceptor.add((_) { // CoolKeyboard.sendPerformAction(TextInputAction.done); // return true; // }, zIndex: 1, name: 'CustomKeyboard'); } // BackButtonInterceptor.removeByName('CustomKeyboard');
是的,这个是模仿原生键盘的操作
No branches or pull requests
如题,在你的Demo例子上,
TextField( decoration: InputDecoration(labelText: '演示键盘弹出后滚动'), keyboardType: NumberKeyboard.inputType, onSubmitted: (txt){ print('aaaaaaaa'); }, ), TextField( decoration: InputDecoration(labelText: '多个键盘演示'), keyboardType: TestKeyboard.inputType, onSubmitted: (txt){ print('bbbbbbb'); }, )
加上onSubmitted,当键盘弹出时,按返回键,就会自动促发onSubmitted
The text was updated successfully, but these errors were encountered: