geoflutterfire
3.0.3, released 5 years ago by noeatsleepteam.com
Store and query Firestore documents based on geographic location in real time.
What it does
GeoFlutterFire is a lightweight add-on library for Cloud Firestore that lets you save geographical locations and query documents within a given radius. It uses geohashes to perform queries and returns real-time streams of document snapshots.
AI-written summary of version 3.0.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need real-time location-based queries using Firebase Firestore
- You want to filter documents within a specific radius from a center point
Skip it when
- You need complex range queries on multiple fields alongside geoqueries
- You rely heavily on built-in server-side limit() or orderBy() combined with location filtering
Strengths
- Real-time streaming of geographic query results
- Seamless integration with cloud_firestore and support for `withConverter`
- Supports strict mode filtering and nested location fields
Weaknesses
- Does not support limit() or orderBy() out of the box
- Strict mode filtering happens on the client side which may cause unnecessary document reads at large radii
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
Requires a Firebase project with Cloud Firestore set up.
final geo = Geoflutterfire();
final _firestore = FirebaseFirestore.instance;
GeoFirePoint center = geo.point(latitude: 12.960632, longitude: 77.641603);
var collectionReference = _firestore.collection('locations');
Stream<List<DocumentSnapshot>> stream = geo.collection(collectionRef: collectionReference).within(center: center, radius: 50, field: 'position');Alternatives
Packages that do the same job and could replace geoflutterfire.
- location_web
Web implementation of the location plugin for Flutter web.
74Compare - geoflutterfire2
Realtime geo queries on Firestore using geohashes
50Compare - geoflutterfire_plus
Store and query Cloud Firestore documents based on geographic locations.
66Compare - flutter_geofire
Flutter plugin for realtime location queries using GeoFire and Firebase.
48Compare
Works with
Packages commonly used together with geoflutterfire: ones it builds on, ones built on it, and its own family.
- flutter_lintsgeoflutterfire depends on itProvides the recommended set of Flutter lint rules for static analysis.
- rxdartgeoflutterfire depends on itImplementation of the ReactiveX API for asynchronous programming leveraging native Dart Streams.
- cloud_firestoregeoflutterfire depends on itFlutter plugin for Cloud Firestore noSQL database with live synchronization.