streamEffect<R> method

EffectNotifier<T, R> streamEffect<R>(
  1. StreamEffect<T, R> effect, {
  2. R? data,
  3. Result<R>? result,
  4. Duration? expiration,
  5. ResultNotifierCallback<R>? onReset,
  6. R onErrorReturn(
    1. Object? error
    )?,
  7. bool autoReset = false,
  8. bool refreshOnError = false,
  9. bool ignoreLoading = false,
})

Creates a new asynchronous EffectNotifier that executes the provided strean effect the data of this notifier changes.

See StreamEffectNotifier.

Implementation

EffectNotifier<T, R> streamEffect<R>(
  StreamEffect<T, R> effect, {
  R? data,
  Result<R>? result,
  Duration? expiration,
  ResultNotifierCallback<R>? onReset,
  R Function(Object? error)? onErrorReturn,
  bool autoReset = false,
  bool refreshOnError = false,
  bool ignoreLoading = false,
}) {
  return StreamEffectNotifier(
    this,
    effect: effect,
    data: data,
    result: result,
    expiration: expiration,
    onReset: onReset,
    onErrorReturn: onErrorReturn,
    autoReset: autoReset,
    refreshOnError: refreshOnError,
    ignoreLoading: ignoreLoading,
  );
}