listen method

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

    Calls callback with current value, when the value changes.

    Implementation

    StreamSubscription<T> listen(void Function(T) onData,
            {Function onError, void Function() onDone, bool cancelOnError}) =>
        stream.listen(onData, onError: onError, onDone: onDone);