1

我在游戏中有很多可以点击或拖动的对象。在游戏的一个阶段我需要删除一些交互,我知道有 StreamSubscription.cancel() 但这需要大量代码来单独存储订阅并在需要时取消它们。有什么简单的方法可以清除“不知道”分配给元素的订阅吗?

4

1 回答 1

2

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.

于 2013-04-14T20:23:20.517 回答