我正在构建一个移动应用程序,我想在键盘出现在屏幕上时(即当输入文本字段成为焦点时)删除小部件。
我尝试使用,RawKeyboardListener但似乎无法正常工作,我的代码如下:
new Container(
child: new RawKeyboardListener(focusNode: new FocusNode(),
onKey: (input) => debugPrint("*****KEY PRESSED"),
child: new TextField(
controller: new TextEditingController(),
)));
Run Code Online (Sandbox Code Playgroud) flutter ×1