Git Product home page Git Product logo

Comments (8)

DarshanGowda0 avatar DarshanGowda0 commented on May 23, 2024 3

Thanks @felipecesar42 šŸ˜„

from geoflutterfire.

felpsio avatar felpsio commented on May 23, 2024

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
}

from geoflutterfire.

gustavobrian avatar gustavobrian commented on May 23, 2024

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 = geo.collection(collectionRef: collectionReference).within(center: center, radius: radius1, field: field);

stream1.listen((List<DocumentSnapshot> documentList) {
  print(documentList.toString());
});

from geoflutterfire.

gustavobrian avatar gustavobrian commented on May 23, 2024

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!!!

from geoflutterfire.

felpsio avatar felpsio commented on May 23, 2024

@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

from geoflutterfire.

gustavobrian avatar gustavobrian commented on May 23, 2024

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!

from geoflutterfire.

felpsio avatar felpsio commented on May 23, 2024

Cool @gustavobrian. Iā€™m glad that I could help. Happy code bro

from geoflutterfire.

felpsio avatar felpsio commented on May 23, 2024

By the way... you should close this issue

from geoflutterfire.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.