小编lor*_*ius的帖子

Flutter Web 中出现“断言失败:_pressedKeys.containsKey(event.physicalKey)”错误

我通过 POST 请求从 API 获取数据。然后我将数据填充到 GridView Builder 中。但是当我滚动应用程序的网络版本时,它给了我这个错误:

\n
\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90 Exception caught by services library \xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\nThe following assertion was thrown during a platform message callback:\nAssertion failed:\n../\xe2\x80\xa6/services/hardware_keyboard.dart:441\n_pressedKeys.containsKey(event.physicalKey)\n"A KeyUpEvent 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: KeyUpEvent#6f053(physicalKey: PhysicalKeyboardKey#700e3(usbHidUsage: \\"0x000700e3\\", debugName: \\"Meta …
Run Code Online (Sandbox Code Playgroud)

dart flutter flutter-web

21
推荐指数
3
解决办法
2万
查看次数

标签 统计

dart ×1

flutter ×1

flutter-web ×1