LAsyncView<T>.store constructor
LAsyncView<T>.store (
- LevitAsyncStore<
T> store, { - Key? key,
- required Widget builder(
- BuildContext context,
- T controller
- bool autoWatch = true,
- Widget loading(
- BuildContext context
- Widget error(
- BuildContext context,
- Object error
- List<
Object?> ? args,
Syntax sugar for consuming a LevitAsyncStore.
Implementation
factory LAsyncView.store(
LevitAsyncStore<T> store, {
Key? key,
required Widget Function(BuildContext context, T controller) builder,
bool autoWatch = true,
Widget Function(BuildContext context)? loading,
Widget Function(BuildContext context, Object error)? error,
List<Object?>? args,
}) =>
LAsyncView<T>(
key: key,
resolver: (context) => context.levit.findAsync<T>(key: store),
builder: builder,
autoWatch: autoWatch,
loading: loading,
error: error,
args: args,
);