C:/Users/$USER/AppData/Local/Pub/Cache/hosted/pub.dev/bonfire-3.5.0/lib/base/listener_game_widget.dart:305:30: Error: The argument type 'RawKeyEvent' can't be assigned to the parameter type 'KeyEvent'.
'RawKeyEvent' is from 'package:flutter/src/services/raw_keyboard.dart' ('/C:/flutter/packages/flutter/lib/src/services/raw_keyboard.dart').
'KeyEvent' is from 'package:flutter/src/services/hardware_keyboard.dart' ('/C:/flutter/packages/flutter/lib/src/services/hardware_keyboard.dart').
return game.onKeyEvent(event, RawKeyboard.instance.keysPressed);
^
/C:/Users/$USER/AppData/Local/Pub/Cache/hosted/pub.dev/bonfire-3.5.0/lib/base/base_game.dart:110:17: Error: The parameter 'event' of the method 'BaseGame.onKeyEvent' has type 'RawKeyEvent', which does not match the corresponding type, 'KeyEvent', in the overridden method, 'FlameGame with PointerDetector, KeyboardEvents.onKeyEvent'.
'RawKeyEvent' is from 'package:flutter/src/services/raw_keyboard.dart' ('/C:/flutter/packages/flutter/lib/src/services/raw_keyboard.dart').
'KeyEvent' is from 'package:flutter/src/services/hardware_keyboard.dart' ('/C:/flutter/packages/flutter/lib/src/services/hardware_keyboard.dart').
Change to a supertype of 'KeyEvent', or, for a covariant parameter, a subtype.
RawKeyEvent event,
^
/C:/Users/$USER/AppData/Local/Pub/Cache/hosted/pub.dev/bonfire-3.5.0/lib/base/base_game.dart:14:16: Context: This is the overridden method ('onKeyEvent').
abstract class BaseGame extends FlameGame
^
/C:/Users/$USER/AppData/Local/Pub/Cache/hosted/pub.dev/bonfire-3.5.0/lib/base/base_game.dart:118:33: Error: The argument type 'RawKeyEvent' can't be assigned to the parameter type 'KeyEvent'.
'RawKeyEvent' is from 'package:flutter/src/services/raw_keyboard.dart' ('/C:/flutter/packages/flutter/lib/src/services/raw_keyboard.dart').
'KeyEvent' is from 'package:flutter/src/services/hardware_keyboard.dart' ('/C:/flutter/packages/flutter/lib/src/services/hardware_keyboard.dart').
return super.onKeyEvent(event, keysPressed);
^
/C:/Users/$USER/AppData/Local/Pub/Cache/hosted/pub.dev/bonfire-3.5.0/lib/base/base_game.dart:123:29: Error: The argument type 'RawKeyEvent' can't be assigned to the parameter type 'KeyEvent'.
'RawKeyEvent' is from 'package:flutter/src/services/raw_keyboard.dart' ('/C:/flutter/packages/flutter/lib/src/services/raw_keyboard.dart').
'KeyEvent' is from 'package:flutter/src/services/hardware_keyboard.dart' ('/C:/flutter/packages/flutter/lib/src/services/hardware_keyboard.dart').
return super.onKeyEvent(event, keysPressed);
Steps to reproduce?
1. Install bonfire
2. Implement BonfireWidget
3. Run main.dart
- Flutter version 3.19.0
- Dart version 3.3.0
- OpenJDK 17.0
- Android 11 (API 30)
- bonfire: ^3.5.0
What happened?
C:/Users/$USER/AppData/Local/Pub/Cache/hosted/pub.dev/bonfire-3.5.0/lib/base/listener_game_widget.dart:305:30: Error: The argument type 'RawKeyEvent' can't be assigned to the parameter type 'KeyEvent'.
Steps to reproduce?
What did you expect to happen?
I hoped the project would run.
Bonfire version
3.5.0
Relevant log output
No response