Issue
I want to get user's location accuracy (circle's radius) in meters.
I have been searching about a day but I couldn't find any solution about this problem.
Any help is appreciated.
Solution
Please read the documentation thoroughly before asking on SO.
Both the geolocator and location packages provide this ability.
The geolocator package has an accuracy property on the Position object it uses.
final geo = Geolocator();
final location = await geo.getCurrentPosition();
print(location.accuracy);
The location package has an accuracy property on the LocationData object it uses.
final loc = Location();
final locData = await loc.getLocation();
print(locData.accuracy);
Answered By - Christopher Moore
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.