【发布时间】:2018-05-29 03:47:00
【问题描述】:
我正在构建一个移动应用程序,我想在键盘出现在屏幕上时删除一个小部件,即当输入文本字段处于焦点时。
我尝试使用RawKeyboardListener 但这似乎不起作用,我的代码如下:
new Container(
child: new RawKeyboardListener(focusNode: new FocusNode(),
onKey: (input) => debugPrint("*****KEY PRESSED"),
child: new TextField(
controller: new TextEditingController(),
)));
【问题讨论】:
标签: flutter