fluttercommunity / firestore_helpers

Firestore Helpers - Firestore helper function to create dynamic and location based queries. Maintainer: @escamoteur
https://pub.dev/packages/firestore_helpers
MIT License
48 stars 19 forks source link

How do i get other data from the document after filter? #20

Closed momoDragon closed 5 years ago

momoDragon commented 5 years ago

I tried the example code and it worked. But how do i get other data from the query ?

Stream<List> getLocations({GeoPoint center, double radiusInKm}) { return getDataInArea( source: Firestore.instance.collection('items'), area: Area(center, radiusInKm), locationFieldNameInDB: 'position', mapper: (doc) => LocationSerializer().fromMap(doc.data), locationAccessor: (item) => item.position, // The distancemapper is applied after the mapper distanceMapper: (item, dist) { item.distance = dist; return item; }); }

What do i have to do?