StreamProvider<T>.value constructor

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

Listens to value and expose it to all of StreamProvider descendants.

Implementation

StreamProvider.value({
  Key? key,
  required Stream<T>? value,
  required T initialData,
  ErrorBuilder<T>? catchError,
  UpdateShouldNotify<T>? updateShouldNotify,
  bool? lazy,
  TransitionBuilder? builder,
  Widget? child,
}) : super.value(
        key: key,
        lazy: lazy,
        builder: builder,
        value: value,
        updateShouldNotify: updateShouldNotify,
        startListening: _streamStartListening(
          catchError: catchError,
          initialData: initialData,
        ),
        child: child,
      );