admin管理员组

文章数量:1303353

I have a screen. There is a TextField on it, with onTapOutside=(){} (to not lose focus) and keyboard type set to none. And there is custom inapp onscreen keyboard.

I need a way to simulate key events when tapping keys on the keyboard.

I tried HardwareKeyboard.instance.handleKeyEvent. I tried KeyEventSimulator from flutter_test package, with removing TestAsyncUtils.guard and TestDefaultBinaryMessengerBinding changing to ServicesBinding.

I expected the characters to appear in the input field.

本文标签: flutterIs there any way to simulate keyboard eventsStack Overflow