Error: Assertion failed: result != null "Invalid modifier location: Control, 0"

Viewed 460

I get this Assertion failed error occasionally on Flutter-web.

Paused on exception

Error: Assertion failed: org-dartlang- sdk:///flutter_web_sdk/lib/_engine/engine/keyboard_binding.dart:339:16 result != null "Invalid modifier location: Control, 0"

when I run through if (event is RawKeyDownEvent)

KeyEventResult _handleKeyPress(FocusNode node, RawKeyEvent event) {
    if (event is RawKeyDownEvent) {
      if (event.logicalKey == LogicalKeyboardKey.enter) {Do something}
    }
}        

I'm trying to handle keypress events on a TextField. It doesn't happen all the time. I'm trying to figure out what could be causing it.

0 Answers
Related