flutter_live_data 2.2.5 copy "flutter_live_data: ^2.2.5" to clipboard
flutter_live_data: ^2.2.5 copied to clipboard

LiveData for Flutter, Stream warpper make easy control and robust feature.

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);

or bind with life cycle observer

var counter = LiveData(1).owner(lifeCycleOwner);

Update Value #

var counter = LiveData(1);
counter.value = 2;
counter.value += 1;
counter.value++;

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']);
8
likes
80
points
1.11k
downloads

Publisher

unverified uploader

Weekly Downloads

LiveData for Flutter, Stream warpper make easy control and robust feature.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, logger

More

Packages that depend on flutter_live_data