bloc_cli 0.1.2-dev copy "bloc_cli: ^0.1.2-dev" to clipboard
bloc_cli: ^0.1.2-dev copied to clipboard

outdated

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
0
pub points
0%
popularity

Publisher

unverified uploader

Create command line interfaces from your BLoCs.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

meta

More

Packages that depend on bloc_cli