StreamProvider<T> constructor
StreamProvider<T> ({
- Key? key,
- required Create<
Stream< create,T> ?> - required T initialData,
- ErrorBuilder<
T> ? catchError, - UpdateShouldNotify<
T> ? updateShouldNotify, - bool? lazy,
- TransitionBuilder? builder,
- Widget? child,
Creates a Stream using create
and subscribes to it.
The parameter create
must not be null
.
Implementation
StreamProvider({
Key? key,
required Create<Stream<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: _streamStartListening(
catchError: catchError,
initialData: initialData,
),
child: child,
);