flutter-pi
flutter-pi copied to clipboard
Make use of new `FlutterKeyEvent` API
The embedder API supports a new way for sending key events for quite some time now:
- https://github.com/flutter/engine/blob/bde8d452466580b9b6230a98008c5c77450c8fd4/shell/platform/embedder/embedder.h#L931-L1000
- https://github.com/flutter/engine/blob/bde8d452466580b9b6230a98008c5c77450c8fd4/shell/platform/embedder/embedder.h#L2095-L2119
Support this instead of just the old flutter/keyevent channel, since otherwise the flutter keyboard manager has to synthesize the new HardwareKeyboard-style KeyEvents from the old RawKeyboard-style RawKeyEvents, with a bit of information loss (the produced text characters):
- https://github.com/flutter/flutter/blob/b938dc13df32cd510844863a66856dd240dc3302/packages/flutter/lib/src/services/hardware_keyboard.dart#L968-L1045