flutter_geocoder
flutter_geocoder copied to clipboard
It is NOT supporting to Null Safety
I have setup it in my project but getting error:
The library 'package:geocoder/geocoder.dart' is legacy, and should not be imported into a null safe library.
Try migrating the imported library.
Please update it's library and make it compatible with Null Safety. Thanks.
yeah make it null safe asap
I guess you can go with #64 @AliYar-Khan @kamleshwebtech
dependencies:
flutter:
sdk: flutter
flutter_geocoder:
git:
url: https://github.com/JCKodel/flutter_geocoder.git
ref: "b0361f4"
I am getting this error when I try your method
pub get failed (server unavailable) -- attempting retry 4 in 8 seconds...
Git error. Command: `git rev-list --max-count=1 b0361f4`
stdout:
stderr: fatal: ambiguous argument 'b0361f4': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
exit code: 128
@AlexMainaMunyua try this 7059f6f
dependencies:
flutter:
sdk: flutter
flutter_geocoder:
git:
url: https://github.com/JCKodel/flutter_geocoder.git
ref: "7059f6f"
BTW you don't need this any more, cause the package is now sounding null-safety
Do we have a null-safe variant of this that also supports iOS?
@Markaleth yes we do. Better read the docs once. 😄
@yahu1031 would you please help with a link, Im struggling with finding null safe geocoder versions that support iOS. thanks!
@mZadorskii the latest version is sounding null safety. Not sure what are you struggling with 😕
@kamleshwebtech or @aloisdeniel better close this issue.
@yahu1031 My bad, I just looked yaml and saw 2.12 sdk.
pub dev is not showing Null-safe sticker next to library for some reason
No need to worry about it buddy @mZadorskii just continue with it.
It looks like what is checked into master has been updated for null safety, but that it has not been published to pub.dev. The latest version on pub.dev is still 0.2.1 which is NOT null sound safe. Are there plans to publish 0.3.0?
All is good now. Previously I was getting some issues.
You can close this issue.
~~The linked PR that fixes the null safety seems to have an issue with converting coordinates to an address in iOS, anyone else having the same issue or knows what the issue is? https://github.com/JCKodel/flutter_geocoder/pull/1#issuecomment-887420192~~
Just want to add I was using the git-version with the null-safety fix
flutter_geocoder:
git:
url: https://github.com/JCKodel/flutter_geocoder.git
ref: "7059f6f"
The pub.dev is still 0.2.1 as @coreysprague mentioned, so that is not possible to use, but I realised that using the following solves the issue.
flutter_geocoder:
git:
url: https://github.com/aloisdeniel/flutter_geocoder.git
ref: "2ee33a9"
So basically, until the version is upgraded in pub.dev we could use the latter.
flutter_geocoder: git: url: https://github.com/aloisdeniel/flutter_geocoder.git ref: "2ee33a9"
The plugin geocoder
uses a deprecated version of the Android embedding.