flutter_chat_ui
flutter_chat_ui copied to clipboard
Has a bug in windows
late final _inputFocusNode = FocusNode( onKeyEvent: (node, event) { if (event.physicalKey == PhysicalKeyboardKey.enter && !HardwareKeyboard.instance.physicalKeysPressed.any( (el) => <PhysicalKeyboardKey>{ PhysicalKeyboardKey.shiftLeft, PhysicalKeyboardKey.shiftRight, }.contains(el), )) { if (event is KeyDownEvent) { _handleSendPressed(); } return KeyEventResult.handled; } else { return KeyEventResult.ignored; } }, );
A KeyRepeatEvent is dispatched, but the state shows that the physical key is not 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: KeyRepeatEvent#858f1(physicalKey: PhysicalKeyboardKey#700e0(usbHidUsage: "0x000700e0", debugName: "Control Left"), logicalKey: LogicalKeyboardKey#00100(keyId: "0x200000100", keyLabel: "Control Left", debugName: "Control Left"), character: null, timeStamp: 128:57:41.021136)
'package:flutter/src/services/hardware_keyboard.dart':
Failed assertion: line 432 pos 16: '_pressedKeys.containsKey(event.physicalKey)'
Hey, sorry, I didn't have Windows machine for years :) So I will need some help here.