onUnsubscribe method
Called after every unsubscribe. Subclasses use it to tear their event source down once hasListeners turns false.
Implementation
@override
@protected
void onUnsubscribe() {
if (!hasListeners) {
_cleanup?.call();
_cleanup = null;
}
}