effect<R> method
Creates a new synchronous EffectNotifier that executes the provided effect the data of this notifier changes.
See SyncEffectNotifier.
Implementation
EffectNotifier<T, R> effect<R>(
Effect<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 SyncEffectNotifier(
this,
effect: effect,
data: data,
result: result,
expiration: expiration,
onReset: onReset,
onErrorReturn: onErrorReturn,
autoReset: autoReset,
refreshOnError: refreshOnError,
ignoreLoading: ignoreLoading,
);
}