scopeAsyncStateSync<T extends Object, CA extends ReducerAction, CE> method
StoreInterface<AsyncState<T> , E, AsyncStateAction>
scopeAsyncStateSync<T extends Object, CA extends ReducerAction, CE>({
- required FutureOr<
T> loader(- E
- required AsyncState<
T> toChildState(- S
- required S fromChildState(
- S,
- AsyncState<
T>
Implementation
StoreInterface<AsyncState<T>, E, AsyncStateAction>
scopeAsyncStateSync<T extends Object, CA extends ReducerAction, CE>(
{required FutureOr<T> Function(E) loader,
required AsyncState<T> Function(S) toChildState,
required S Function(S, AsyncState<T>) fromChildState}) {
return scopeSyncState(
toChildState: toChildState,
fromChildState: fromChildState,
childReducer: asyncStateReducer(loader),
toChildEnvironment: (env) => env);
}