GeoFirestore class Null safety

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


GeoFirestore(CollectionReference collectionReference)


collectionReference CollectionReference
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


getAtLocation(GeoPoint center, double radius, {bool exact = true, bool addDistance = true}) Future<List<DocumentSnapshot>>
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 non-existent method or property is accessed. [...]
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. [...]


operator ==(Object other) bool
The equality operator. [...]

Static Methods

getLocationValue(DocumentSnapshot documentSnapshot) GeoPoint?
Build a GeoPoint from a documentSnapshot