Reputation: 241
How to write GeoPoints data like this in Firebase Firestore in Flutter?
I just want to simply store latitue and longitude data
Upvotes: 0
Views: 631
Reputation: 883
There's a GeoPoint
type provided by the Flutter Firebase library. You just do this:
final result = await FirebaseFirestore.instance
.collection('waypoints')
.add({
'startPoint': GeoPoint(5.373982, 2.705164)
});
Upvotes: 3