I'm using geoflutterfire() to get some datas. It works fine but for a part of my app, I would like to send only a List to another screen without calling again firebase.
I do : `
GeoFirePoint maposition =
geofire.point(latitude: latitude, longitude: longitude);
Stream<List<DocumentSnapshot>> streamg = Geoflutterfire()
.collection(collectionRef: refe)
.within(
center: maposition,
radius: cercle.toDouble(),
field: 'pos',
strictMode: true);
`
and `
return StreamBuilder<List<DocumentSnapshot>>(
stream: streamg,
builder: (context, snapshot) {
...
if (snapshot.hasData) {
...
List<Object?> laListeDesExpires =
snapshot.data!.map((e) => e.data()).toList();
...
}
`
With this method, I get all the datas and I can pass everything to the other page EXCEPT the snapshot.data!.id
Does anyone have an idea ?
Thanks a lot
I tried `
List<Object?> laListeDesExpires =
snapshot.data!.map((e) => e.data()).toList();
`
and I expect to get the document id