stop method

Future<void> stop()

Stops the notifier and cleans up resources.

Implementation

Future<void> stop() async {
  await _subscription?.cancel();
  _subscription = null;
  if (!_controller.isClosed) {
    await _controller.close();
  }
}