transistorsoft / flutter_background_geolocation_firebase

Firebase proxy for Flutter Background Geolocation SDK
MIT License
21 stars 7 forks source link

Add support for sound null safety #22

Closed alfalcon90 closed 2 years ago

alfalcon90 commented 2 years ago

Is your feature request related to a problem? Please describe. Builds fail on Flutter projects that have sound null safety enabled

Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:

- package:background_geolocation_firebase

Describe the solution you'd like Migrate flutter_background_geolocation_firebase to use sound null safety

Describe alternatives you've considered You can still build the app using flutter run --no-sound-null-safety but then you lose some of the benefits of sound null safety according to the Dart documentation

However, a mixed-version program can’t have the runtime soundness guarantees that a fully null-safe app has. It’s possible for null to leak out of the null-unsafe libraries into the null-safe code, because preventing that would break the existing behavior of the unmigrated code.

Additional context Add any other context or screenshots about the feature request here.

christocracy commented 2 years ago

Your Environment

alfalcon90 commented 2 years ago

I'm using 0.2.0 but I just realized there's a prerelease version with null-safety under the Versions tab in pub.dev https://pub.dev/packages/background_geolocation_firebase/versions

I'll give that a try tomorrow but that should do the trick. Thanks, Chris!

alfalcon90 commented 2 years ago

It works like a charm. I'm not sure if it was added in the 1.0.0-nullsafety.1 release but Firebase Emulator support is also working now (it wasn't on 0.2.0).