setPoint method
set a geo point with latitude
and longitude
using field
as the object key to the document with id
Implementation
Future<void> setPoint(
String id,
String field,
double latitude,
double longitude,
) {
try {
CollectionReference colRef = _collectionReference as CollectionReference;
var point = GeoFirePoint(latitude, longitude).data;
return colRef.doc(id).set({field: point}, SetOptions(merge: true));
} catch (e) {
throw Exception(
'cannot call set on Query, use collection reference instead');
}
}