listen method

  1. @override
StreamSubscription<State> listen(
  1. void onData(
    1. State
    ),
  2. {Function onError,
  3. void onDone(
      ),
    1. bool cancelOnError}
    )
    override

    Adds a subscription to the Stream<State>. Returns a StreamSubscription which handles events from the Stream<State> using the provided onData, onError and onDone handlers.

    Implementation

    @override
    StreamSubscription<State> listen(
      void Function(State) onData, {
      Function onError,
      void Function() onDone,
      bool cancelOnError,
    }) {
      return _stateSubject.listen(
        onData,
        onError: onError,
        onDone: onDone,
        cancelOnError: cancelOnError,
      );
    }