Closed gustavobrian closed 5 years ago
You wrote half of the code needed. It should work something like this:
Stream<List<DocumentSnapshot>> stream = geo.collection(collectionRef: ref)
.within(center: center, radius: rad, field: 'geoFirePoint');
stream.listen((List<DocumentSnapshot> documentList) {
//do something
}
hi felipe:
test() async { var collectionReference = await Firestore.instance.collection('userBasic').where('provider', isEqualTo: true).getDocuments(); print(collectionReference.toString()); }
test() WORK! Next not Work pd: if remove '.where('provider', isEqualTo: true)' from collection reference in geo.collection work ok!!
var collectionReference = Firestore.instance.collection('userBasic').where('provider', isEqualTo: true);
GeoFirePoint center = geo.point(latitude: _geoFirePointProvider.latitude, longitude: _geoFirePointProvider.longitude);
double radius1 = 50;
String field = 'geoFirePoint';
Stream<List
stream1.listen((List<DocumentSnapshot> documentList) {
print(documentList.toString());
});
hello, any solution? // Collection ref // var collectionReference = _firestore.collection('locations').where('city', isEqualTo: 'bangalore'); var collectionReference = _firestore.collection('locations'); var geoRef = geo.collection(collectionRef: collectionReference);
collectionReference not work with "where"
firebase_core: ^0.3.4 geoflutterfire: git: https://github.com/felipecesar42/GeoFlutterFire.git
Thanks!!!
@gustavobrian You should use the last version of this library, not my version. The change I made it's already pushed to the repository. So my version is not needed anymore.
Firestore have lots of query limitations right now. You should study a little its limitations: https://firebase.google.com/docs/firestore/query-data/queries.
Your problem is probably not related to the library. You can try to post your problem in a detailed way in StackOverflow.
Anyway... try to debug your app and understand what is the exception thrown. Many problems related to the firebase gets a detailed explanation on the exception
thanks felipe cesar... the error is the debug not show create index... I create manually index: provider Ascendente geoFirePoint.geohash Ascendente
and work...
THANKS!!! happy code!
Cool @gustavobrian. I’m glad that I could help. Happy code bro
By the way... you should close this issue
Thanks @felipecesar42 😄
hi, thank for your works!! do you like help me?
-------- WORK PERFECT ---------------- var collectionReference = Firestore.instance.collection('userBasic').where('provider', isEqualTo: false).where('ispublic', isEqualTo: true); var acata = await collectionReference.getDocuments();
--------WORK PERFECT---------------- stream = radius.switchMap((rad) { var collectionReference = Firestore.instance.collection('userBasic')
--------NOT WORK , NOT RETURN ---------------- stream = radius.switchMap((rad) { var collectionReference = Firestore.instance.collection('userBasic').where('provider', isEqualTo: false).where('ispublic', isEqualTo: true);