florent37 / Flutter-AssetsAudioPlayer

Play simultaneously music/audio from assets/network/file directly from Flutter, compatible with android / ios / web / macos, displays notifications
https://pub.dartlang.org/packages/assets_audio_player
Apache License 2.0
752 stars 357 forks source link

Null Safety for Dart 3 compatability #785

Closed Sun3 closed 1 year ago

Sun3 commented 1 year ago

Flutter Version 3.10.6

My version : 3.10.6

Lib Version assets_audio_player: ^3.0.6

My version : assets_audio_player: ^3.0.6

Platform (Android / iOS / web) + version Latest

Platform : iOS, Android

Describe the bug Cannot compile library example

A clear and concise description of what the bug is.

The current Dart SDK version is 3.0.6.

Because assets_audio_player_example depends on build_web_compilers >=0.2.0 <3.0.0 which doesn't support null safety, version solving failed.

The lower bound of "sdk: '>=1.22.1 <2.0.0 or >=2.0.0-dev.9 <3.0.0'" must be 2.12.0 or higher to enable null safety.
For details, see https://dart.dev/null-safety
Process finished with exit code 1

Small code to reproduce Run the Library example and you will receive the error regarding NULL Safety.

Thank you.

hunterwilhelm commented 1 year ago

I don't completely understand this error/bug. But for my situation, I changed my pubspec.yaml like so:

environment:
  sdk: ">=2.17.0"
  flutter: ">=2.0.0"

And any conflicts in packages, I just downgraded the package to the version found in the errors.

I hope that helps anyone else while this is getting fixed!

kalismeras61 commented 1 year ago

Please test 3.0.9. Should be worked