beerstorm-net / GeoFlutterFire2

🔥GeoFlutterFire2🔥 is an open-source library that allows you to store and query firestore documents based on their geographic location.
https://pub.dev/packages/geoflutterfire2
MIT License
14 stars 40 forks source link

How to get distance from center #37

Open tchouaffe opened 9 months ago

tchouaffe commented 9 months ago

I would like to know how to get the distance from the center. When I do the below I get A value of type 'Object?' can't be assigned to a variable of type 'Map<String, dynamic>'. on the first line. document is of type DocumentSnapshot.

 Map<String, dynamic> snapData = document.data();
 final GeoPoint point = snapData['position']['geopoint'];