FutureProvider<T> constructor

FutureProvider<T>({
  1. required Create<Future<T>?> create,
  2. required T initialData,
  3. Key? key,
  4. ErrorBuilder<T>? catchError,
  5. UpdateShouldNotify<T>? updateShouldNotify,
  6. bool? lazy,
  7. TransitionBuilder? builder,
  8. Widget? child,
})

Provides the value of the future create makes, initialData until it completes.

Implementation

FutureProvider({
  required super.create,
  required T initialData,
  super.key,
  ErrorBuilder<T>? catchError,
  super.updateShouldNotify,
  super.lazy,
  super.builder,
  super.child,
}) : super(
       startListening: _futureStartListening(
         initialData: initialData,
         catchError: catchError,
       ),
     );