StreamProvider<T> constructor

StreamProvider<T>({
  1. required Create<Stream<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 last value of the stream create makes, initialData until it gives one.

Implementation

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