FHUStreamToValueNotifier<T> extension
Extension on Stream<T>
to convert any stream into a ValueNotifier<T>
.
This extension provides a convenient way to bridge the reactive world of streams
with the ValueNotifier
pattern used for state management in Flutter applications. By converting
a stream into a ValueNotifier
, you can easily integrate asynchronous stream data into your
Flutter widgets with the reactive and efficient update mechanism that ValueNotifier
provides.
- on
-
- Stream<
T>
- Stream<
Methods
-
toValueNotifier(
T initialValue, {void onDone(T)?, void onError(Object, StackTrace)?}) → ValueListenable< T> -
Converts the current stream into a
ValueListenable<T>
which is effectively aValueNotifier<T>
.