GeoFirestore class

A GeoFirestore instance is used to store and query geo location data in Firestore.

Constructors

GeoFirestore(CollectionReference<Map<String, dynamic>> collectionReference)

Properties

collectionReference ↔ CollectionReference<Map<String, dynamic>>
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getAtLocation(GeoPoint center, double radius, {bool exact = true, bool addDistance = true}) Future<List<DocumentSnapshot<Map<String, dynamic>>>>
Returns the documents centered at a given location and with the given radius. center The center of the query radius The radius of the query, in kilometers. The maximum radius that is supported is about 8587km. If a radius bigger than this is passed we'll cap it. addDistance Whether to process data and add distance property to returned documents, defaults to True. exact Whether to process data and remove documents that are further than specified radius, defaults to True.
getLocation(String documentID) Future<GeoPoint?>
Gets the current location of a document for the given documentID.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeLocation(String documentID, GeoPoint location) Future
Removes the location of a document for the given documentID.
setLocation(String documentID, GeoPoint location) Future
Sets the location of a document for the given documentID.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getLocationValue(DocumentSnapshot<Object?> documentSnapshot) → GeoPoint?
Build a GeoPoint from a documentSnapshot