closeEventStream method

Future<void> closeEventStream()

Implementation

Future<void> closeEventStream() async {
  await _streamEventSubscription?.cancel();
  _streamEventSubscription = null;
  final controller = _eventController;
  _eventController = null;
  if (controller != null && !controller.isClosed) {
    await controller.close();
  }
}