-
-
Notifications
You must be signed in to change notification settings - Fork 820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type 'Future<dynamic>' is not a subtype of type 'Future<Map<String, double>>' #28
Comments
I too am getting this. I investigated further by hacking my own Location class, changing the signature of getLocation to:
This got me past the problem statement leading to this: So, it looks like:
Is returning an object of type:
I hope this helps. For now, I will be tweaking my hacked version but I'd like to return to the proper version later. |
I made a fix for this issue, and submitted a PR, but in the meanwhile, you can just point to my fork: https://github.com/efortuna/flutterlocation |
Did you see my link? Put this in your pubspec.yaml:
|
do you want remove this flutter package location: "^1.1.7" and put your code or keep both ? |
Until my PR is accepted: #27... linking to my code is a stopgap to make your code work. You don't need the '^1.1.7' -- just the two lines I listed above. |
Hi @efortuna please how do i point to your fork to use in my project... Hope you can give me a guide. |
Thanks... But wen I added got error in pub spec... Dart SDK version 2.2.1 but location from git requires SDK version <2.0.0, version solving failed ... |
Hi! I have the kind of error, when I try to get location:
type 'Future<dynamic>' is not a subtype of type 'Future<Map<String, double>>' where Future is from dart:async Future is from dart:async Map is from dart:core String is from dart:core double is from dart:core
The first string of the stack trace:
#0 Location.getLocation (package:location/location.dart:12:16)
The text was updated successfully, but these errors were encountered: