cancelBroadcastStream method

Future<Null> cancelBroadcastStream(
  1. String eventName
)

Cancel a broadcast stream (= event channel) NOTE: You need to set a method channel before using this method.

Implementation

Future<Null> cancelBroadcastStream(String eventName) async {
  try {
    return await _channel
        ?.invokeMethod("cancel_broadcast_stream", {"name": eventName});
  } on PlatformException catch (e) {
    print(e.message);
  }
}