Open aliakkawi opened 2 years ago
This is what you're looking for ? https://github.com/DarshanGowda0/GeoFlutterFire/pull/193
Is this eventually available?
I have described root cause of not disposing the underlaying stream in here: https://github.com/beerstorm-net/GeoFlutterFire2/pull/26
when this is merged (or you can play around with the fork), you can use new method and then just call first
on the stream, which will close the the stream right away, as it says in the the doc: https://api.flutter.dev/flutter/dart-async/Stream/first.html
Duplicate of https://github.com/DarshanGowda0/GeoFlutterFire/issues/27 just cancel the stream
It won't cancel the stream @giorgio79, it will only cancel the subscription for broadcast stream which was outcome of merged 9 streams under the hood. Original stream will still be active, but you don't have access to it without any code changes.
In my case i need get user Documents on a specific radius and i need that only 'Once', which means i need a way to do that without using Stream. The use of stream causes 'Background concurrent copying GC freed' that leads to memory leaks and freezes the app, I tried to use Stream Subscription and cancel it as soon i receive data for the first time, but i guess the Stream is not getting stopped. I need a way to do it like this QuerySnapshot querySnapshot = await query.get();
Thanks for your suggestions