FutureProvider<T> constructor
FutureProvider<T> ({
- Key? key,
- required Create<
Future< create,T> ?> - required T initialData,
- ErrorBuilder<
T> ? catchError, - UpdateShouldNotify<
T> ? updateShouldNotify, - bool? lazy,
- TransitionBuilder? builder,
- Widget? child,
Creates a Future from create
and subscribes to it.
create
must not be null
.
Implementation
FutureProvider({
Key? key,
required Create<Future<T>?> create,
required T initialData,
ErrorBuilder<T>? catchError,
UpdateShouldNotify<T>? updateShouldNotify,
bool? lazy,
TransitionBuilder? builder,
Widget? child,
}) : super(
key: key,
lazy: lazy,
builder: builder,
create: create,
updateShouldNotify: updateShouldNotify,
startListening: _futureStartListening(
catchError: catchError,
initialData: initialData,
),
child: child,
);