When I run my project on web the Exception message and stack trace was
"Should never encounter KeyData when transitMode is rawKeyData."
at Object.throw_ [as throw] (http://localhost:2621/dart_sdk.js:5061:11)
at Object.assertFailed (http://localhost:2621/dart_sdk.js:4986:15)
at hardware_keyboard.KeyEventManager.new.handleKeyData (http://localhost:2621/packages/flutter/src/services/restoration.dart.lib.js:5334:28)
at http://localhost:2621/dart_sdk.js:160131:47
at Object.invoke (http://localhost:2621/dart_sdk.js:179656:7)
at _engine.EnginePlatformDispatcher.__.invokeOnKeyData (http://localhost:2621/dart_sdk.js:160131:17)
at _engine.KeyboardBinding.__.[_onKeyData] (http://localhost:2621/dart_sdk.js:158922:49)
at _engine.KeyboardConverter.new.handleEvent (http://localhost:2621/dart_sdk.js:159210:16)
at http://localhost:2621/dart_sdk.js:158929:74
at loggedHandler (http://localhost:2621/dart_sdk.js:158906:43)
Error: Assertion failed: file:///E:/flutter_windows_2.5.2-stable/flutter/packages/flutter/lib/src/services/hardware_keyboard.dart:787:16
try one of theies
flutter run -d chrome --web-renderer html
flutter build web --web-renderer html
If you are getting problem on Device or Emulator or Simulator, Just close the app and Run again.
In my case, I have initialised controller in init
method and I changed something related to controller so its needs to be updated. That's why we need to rerun again.
P.S. I thought to restart the app but doesn't worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With