Subscribed Stream | Coderz Product

subscribed_stream

Last updated:

0 purchases

subscribed_stream Image
subscribed_stream Images

Free

Languages

Categories

Add to Cart

Description:

subscribed stream

A utiliy class for easy stream subscription handling
Features #

Create a StreamSubscription Object from a Stream
Transform the event data with the build in callback method
Cache the latest received event data

Getting started #

Recommended use inside BLOC or Provider classes

Usage #
final stream = getRealTimeDataFromDatabase();

final subscribedStream = SubscribedStream<String>(
stream: stream,
onStreamEvent: (data, previousData, subscribedStream) {
if (data != previousData) {
notifyListeners();
}
return data;
},
);

// from UI
final latestValue = subscribedStream.latestValue;
copied to clipboard
Additional information #
Don't hesitate to contact me if you have questions or ideas.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product: (if this is empty don't purchase this product)

Customer Reviews

There are no reviews.