unregisterStream method
Stops listening on stream events.
Implementation
void unregisterStream(Stream? stream) {
if (stream == null) return;
StreamSubscription? subs = _subscriptions.remove(stream);
if (subs != null) {
subs.cancel();
}
}