simple_bloc 1.0.1
simple_bloc: ^1.0.1 copied to clipboard
A simple alternative to the implementation created in Dimension C-137
A simple alternative to the implementation of Dimension C-137
Getting started #
You should ensure that you add the simple_bloc as a dependency in your flutter project.
dependencies:
simple_bloc: "^1.0.1"
read more at how to install
Usage #
Simple BLoC for counter app
class CounterBloc extends Bloc {
final _counterController = BlocController<int>(initalData: 0);
Stream<int> get counterOut => _counterController.stream;
VoidCallback get increment => _counterController.action((value) {
return ++value;
});
@override
void dispose() {
_counterController.dispose();
}
}
Full app example #
checkout at github