DarshanGowda0 / GeoFlutterFire

:fire:GeoFlutterFire:fire: is an open-source library that allows you to store and query firestore documents based on their geographic location.
https://youtu.be/MYHVyl-juUk
MIT License
305 stars 261 forks source link

Collection Stream causes spawning of several snapshot listeners #108

Closed justChris closed 3 years ago

justChris commented 4 years ago

There still seems to be a problem. When I use StreamBuilder or any other stream subscription with the following stream:

geoflutterfire .collection(collectionRef: Firestore.instance.collection(collectionPath)) .within( center: center, radius: radius, field: 'position', strictMode: true, );

There are 9 snapshot listeners spawning. You can see that in the monitoring section of console.cloud.google.com. It is always 9! Why?

screenshot-console cloud google com-2020 07 22-20_02_10

Thanks.

Originally posted by @JustChris in https://github.com/DarshanGowda0/GeoFlutterFire/issues/13#issuecomment-662413515

awhitford commented 3 years ago

Maybe seeing your code will help resolve this. I suspect it is a widget lifecycle issue.