removeListener method
- SubscriptionListener listener
Removes a listener from the Subscription instance so that it will not receive events anymore.
Lifecycle a listener can be removed at any time.
-
listener
The listener to be removed. -
See addListener
Implementation
void removeListener(SubscriptionListener listener) {
var found = _listeners.remove(listener);
if (found) {
scheduleMicrotask(() {
listener.onListenEnd();
});
}
}