subscribe<T> method

StreamSubscription<T> subscribe<T>(
  1. Stream<T> stream,
  2. void onValue(
    1. T value
    ), {
  3. void onError(
    1. Object error
    )?,
})

subscribe for interactors

Implementation

StreamSubscription<T> subscribe<T>(
  Stream<T> stream,
  void Function(T value) onValue, {
  void Function(Object error)? onError,
}) =>
    _compositeSubscription
        .add<T>(stream.listen(onValue, onError: onError?.call));