After installing flame and when i run my app in flutter (flutter run). I got a long error regarding null safety:
Running Gradle task 'assembleDebug'...
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:flame
- package:ordered_set
- package:box2d_flame
- package:audioplayers
- package:path_provider
- package:flutter_svg
- package:path_provider_linux
- package:path_provider_windows
- package:path_provider_platform_interface
- package:uuid
- package:xdg_directories
- package:plugin_platform_interface
- package:crypto
- package:convert
- package:path_drawing
- package:xml
- package:path_parsing
- package:petitparser
...
You are using the old version (0.29.3) which doesn't support null-safety, you have to use one of the newer release candidates of 1.0.0.
dependencies:
flame: ^1.0.0-releasecandidate.11
https://pub.dev/packages/flame/versions/1.0.0-releasecandidate.11/install