FutureProvider<T> constructor

FutureProvider<T>({Key key, @required ValueBuilder<Future<T>> create, @Deprecated('will be removed in 4.0.0, use create instead') ValueBuilder<Future<T>> builder, T initialData, ErrorBuilder<T> catchError, UpdateShouldNotify<T> updateShouldNotify, Widget child })

Creates a Future from create and subscribes to it.

create must not be null.

Implementation

FutureProvider({
  Key key,
  @required ValueBuilder<Future<T>> create,
  @Deprecated('will be removed in 4.0.0, use create instead')
      ValueBuilder<Future<T>> builder,
  T initialData,
  ErrorBuilder<T> catchError,
  UpdateShouldNotify<T> updateShouldNotify,
  Widget child,
}) : this._(
        key: key,
        initialData: initialData,
        catchError: catchError,
        updateShouldNotify: updateShouldNotify,
        // ignore: deprecated_member_use_from_same_package
        delegate: BuilderStateDelegate(create ?? builder),
        child: child,
      );