Reputation: 303
i have a lot of objects in game which can be clicked or dragged. In one phase of game i need remove some interactions, I know that there is StreamSubscription.cancel() but this require lot of code to store subscriptions somewhere separately and cancel them whenever its needed. Is there any simple way to clear subscriptions assigned to element "without knowing them"?
Upvotes: 1
Views: 470
Reputation: 8128
No. You have to keep the subscriptions around.
If it is something that you do frequently you could consider creating abstractions that do it for you.
Upvotes: 2