flutter_live_data

Creator: coderz1093

Last updated:

Add to Cart

Description:

flutter live data

flutter_live_data #
Live Data is wrapper class over Stream, provide robust methods.
view full-document at: https://github.com/tanapoj/flutter_live_data
Create #
// create broadcast stream
var counter = LiveData(1);
var counter = LiveData.broadcast(1);

// create standard stream
var counter = LiveData.single(1);

// create from stream
var counter = LiveData.stream(stream);
copied to clipboard
or bind with life cycle observer
var counter = LiveData(1).owner(lifeCycleOwner);
copied to clipboard
Update Value #
var counter = LiveData(1);
counter.value = 2;
counter.value += 1;
counter.value++;
copied to clipboard
mutable update
var items = LiveData(<String>['A']);

//Not Work!
items.value.add('B');

//Ok
items.value = items.value + ['B'];
items.patch((list) => list.add('B'));
items.transform((list) => list + ['B']);
copied to clipboard

License

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

Files:

Customer Reviews

There are no reviews.