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

Error: No named parameter with the name 'collection'. #16

Closed delphiy closed 5 years ago

delphiy commented 5 years ago

Error: No named parameter with the name 'collection'.

escamoteur commented 5 years ago

Could you please provide a bit more information? What are you trying to do, where do you get this error?

escamoteur commented 5 years ago

Hi, sorry that it took so long. Because of a local data loss the pub package was no longer in sync with the github this should now be solved. Cheers Thomas

delphiy commented 5 years ago

Hi, I used the following code

getDataInArea( collection: locationCollection, area: Area(center, radiusInKm), locationFieldNameInDB: 'position', mapper: (doc) => FbLocation.fromJson(doc.data), locationAccessor: (item) => item.position, // The distancemapper is applied after the mapper distanceMapper: (item, dist) { item.distance = dist; return item; }

);

/////// collection not exist in getDataInArea method

delphiy commented 5 years ago

It works perfect , other question ,

How I can use getDataInArea in firebase cloud function

escamoteur commented 5 years ago

Honestly I don't think that it will be possible.