SarfarazAhmed008 / geofence

Geofencing plugin for flutter application (android and ios). https://pub.dev/packages/geofence_flutter
https://pub.dev/packages/geofence_flutter
MIT License
12 stars 9 forks source link

Null Safety not supported #4

Open JuliusKanneh opened 1 year ago

JuliusKanneh commented 1 year ago

I am trying to implement this package to calculate the distance between two Geo-points using the code snippets below:

final geodesy = Geodesy();
final l1 = const LatLng(50.06638889, 5.71472222);
final l2 = const LatLng(58.64388889, 3.07000000);
var distanceBetweenTwoGeoPoints =
        geodesy.distanceBetweenTwoGeoPoints(l1, l2, 6371e3);
    print('Distance between two geopoints: $distanceBetweenTwoGeoPoints');

but I am getting this error about null safety:

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

 - package:geodesy

For solutions, see https://dart.dev/go/unsound-null-safety

I am using dart version 2.19.6 (stable)

SarfarazAhmed008 commented 1 year ago

It seems you are using an outdated geodesy Flutter package that does not support null safety. Additionally, please note that the geodesy package is not related to the geofence_flutter package. I hope this information solves your problem. Thanks.