Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How properly use functionality without leaks? withinAsSingleStreamSubscription #33

Open
irizzaflutter opened this issue Apr 21, 2023 · 1 comment

Comments

@irizzaflutter
Copy link

/// !WARNING! This causes memory leaks because under the hood rxdart StreamController
/// never causes it's subscriptions to be cancelled. So, even you cancel stream
/// subscription created from this method, under the hood listeners are still working.

.within()

when I try to replace it with .withinAsSingleStreamSubscription()

Stream<List> stream = geo.collection(collectionRef: collectionReference)
.withinAsSingleStreamSubscription(center: center, radius: radius, field: field);

its return me that

withinAsSingleStreamSubscription isn't defined for the class 'GeoFireCollectionRef'

@irizzaflutter
Copy link
Author

case: when user will scroll map it will show only nearest points with selected radius

e.x when i open map i will get my current location, than i scroll to another city and in that case i need fetch only points from new city with radius N

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant