subscribe method

StreamSubscription<T> subscribe(
  1. void onData(
    1. T event
    ),
  2. {Function onError,
  3. void onDone(
      ),
    1. bool cancelOnError,
    2. Symbol id = #__}
    )

    Implementation

    StreamSubscription<T> subscribe(
      void onData(T event), {
      Function onError,
      void onDone(),
      bool cancelOnError,
      Symbol id = #__,
    }) {
      return streamController.stream.listen(
        onData,
        onError: onError,
        onDone: onDone,
        cancelOnError: cancelOnError,
      );
    }