SStream is a simplified version of StreamController which holds the lastest value broadcasted.
- Use buildIn package
- Very simple code
To install this package, follow this instruction.
Import this package and use as you need.
import 'package:sstream/sstream.dart';
void main() {
final SStream<int> count = SStream(0);
// final count = 0.stream;
count.listen((event) {
print(event);
});
count.add(1);
count.add(100);
print(count.value);
}