Calling receiveBroadcastStream on flutter event channel unsubscribes the last listener before it subscribes a new listener. This causes every invocation of FGBGEvents.stream to unsubscribe previous listeners. Also as a side effect one can not both subscribe to a stream and use the FGBGNotifier.
After this fix the stream will be created once (one listener) and can be safely subscribed multiple times.
Calling
receiveBroadcastStream
on flutter event channel unsubscribes the last listener before it subscribes a new listener. This causes every invocation ofFGBGEvents.stream
to unsubscribe previous listeners. Also as a side effect one can not both subscribe to a stream and use theFGBGNotifier
. After this fix the stream will be created once (one listener) and can be safely subscribed multiple times.