getBroadcastStream method

Stream getBroadcastStream(
  1. EventChannel eventChannel,
  2. String eventName
)

For subscribing an event channel (stream channel), (1) your have to prepare the channel instance by each channels. static const EventChannel _stream = const EventChannel('awareframework_core/event'); (2) after that, you have to set the channel by using the following method with a unique name .getBroadcastStream(_stream, "UNIQUE_NAME")

Implementation

Stream<dynamic> getBroadcastStream(
    EventChannel eventChannel, String eventName) {
  return eventChannel.receiveBroadcastStream({"name": eventName});
}