bloc_cli 0.1.3-dev

Dart native js
Flutter Android iOS web

Create command line interfaces from your BLoCs.

bloc_cli #

Create command line interfaces from your BLoCs.

Quickstart #

class ExampleBloc {
  Sink<int> get add => ...;
  Stream<int> get count => ...;
}

Future main() async {
  final cli = BlocCli("Example", ExampleBloc(), (bloc) => bloc.dispose())
    ..stream("count", (b) => b.count)
    ..sink("add", (b) => b.add);

  await cli.run();
}
Example ----------------------------------
Streams:
  * [count]: 0


Sinks: [add]
Type '-exit' to quit
----------------------------------------
Type a sink name to send it a value
----------------------------------------

And obviously, each time one of the streams is updated, the view will refresh.

0
likes
65
pub points
0%
popularity

Create command line interfaces from your BLoCs.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

alois.deniel@gmail.com

License

MIT (LICENSE)

Dependencies

meta

More

Packages that depend on bloc_cli