StreamsProvider<T extends StreamsProvidable>.value constructor
Takes a provider and a child which will have access to the provider via
StreamsProvider.of(context).
When StreamsProvider.value is used, the provider will not be automatically
closed.
As a result, StreamsProvider.value should mainly be used for providing
existing providers to new routes.
A new provider should not be created in StreamsProvider.value.
providers should always be created using the default constructor within
create.
StreamsProvider.value(
value: StreamsProvider.of<ProviderA>(context),
child: ScreenA(),
);
Implementation
StreamsProvider.value({
Key? key,
required T value,
Widget? child,
}) : this._(
key: key,
create: (_) => value,
child: child,
);