════════ Exception caught by services library ══════════════════════════════════
The following assertion was thrown during a platform message callback:
A KeyDownEvent is dispatched, but the state shows that the physical key is already pressed. If this occurs in real application, please report this bug to Flutter. If this occurs in unit tests, please ensure that simulated events follow Flutter's event model as documented in `HardwareKeyboard`. This was the event: KeyDownEvent#d2cbe(physicalKey: PhysicalKeyboardKey#86a89(usbHidUsage: "0x00070008", debugName: "Key E"), logicalKey: LogicalKeyboardKey#1e0f5(keyId: "0x00000065", keyLabel: "E", debugName: "Key E"), character: "e", timeStamp: 68:39:13.782805)
'package:flutter/src/services/hardware_keyboard.dart':
hardware_keyboard.dart:1
Failed assertion: line 530 pos 11: '!_pressedKeys.containsKey(event.physicalKey)'
2
Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=02_bug.yml
When the exception was thrown, this was the stack
#2 HardwareKeyboard._assertEventIsRegular.<anonymous closure>
hardware_keyboard.dart:530
#3 HardwareKeyboard._assertEventIsRegular
hardware_keyboard.dart:550
#4 HardwareKeyboard.handleKeyEvent
hardware_keyboard.dart:681
#5 KeyEventManager.handleRawKeyMessage
hardware_keyboard.dart:1220
#6 BasicMessageChannel.setMessageHandler.<anonymous closure>
platform_channel.dart:261
#7 _DefaultBinaryMessenger.setMessageHandler.<anonymous closure>
binding.dart:653
#8 _invoke2 (dart:ui/hooks.dart:363:13)
#9 _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:45:5)
#10 _Channel._drainStep (dart:ui/channel_buffers.dart:229:31)
(elided 12 frames from class _AssertionError and dart:async)
Steps to reproduce
Expected results
the error A KeyDownEvent is dispatched, but the state shows that the physical key is already pressed. should not be shown and should not block the app to start.
Actual results
The error
A KeyDownEvent is dispatched, but the state shows that the physical key is already pressed.shows and the app is black blank.Code sample
Any flutter sample app would trigger the same error on desktop
Screenshots or Video
N/A
Logs
Logs
Flutter Doctor output
Doctor output