flutter_live_data 1.0.1

Flutter Android iOS web

Live Data in Flutter

flutter_live_data #

Live Data in Flutter

Create #

var counter = LiveData(1);
var counter = LiveData(1).asBroadcast();
var counter = LiveData(1).asMultiStream();

or bind with life cycle observer

var counter = LiveData(1).bind(observer);

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.mutate((list) => list.add('B'));
items.transform((list) => list + ['B']);

Get Stream #

var counter = LiveData(1);

var stream = counter.stream;
var stream = counter.stream$(#id1);

counter.dispose();
1
likes
80
pub points
37%
popularity

Live Data in Flutter

Homepage

Documentation

API reference

Uploader

nartra@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_live_data