bloc_cli 0.1.3-dev

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())"count", (b) => b.count)
    ..sink("add", (b) => b.add);

Example ----------------------------------
  * [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.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  bloc_cli: ^0.1.3-dev

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:bloc_cli/bloc_cli.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.9+1

Health issues and suggestions

Document public APIs. (-1 points)

1 out of 1 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/src/bloc.dart. (-0.50 points)

Analysis of lib/src/bloc.dart reported 1 hint:

line 28 col 10: Don't explicitly initialize variables to null.

Fix lib/src/serializers/serializers.dart. (-0.50 points)

Analysis of lib/src/serializers/serializers.dart reported 1 hint:

line 6 col 8: Unused import: 'types/list.dart'.

Format lib/bloc_cli.dart.

Run dartfmt to format lib/bloc_cli.dart.

Fix additional 7 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/serializers/serializer.dart (Run dartfmt to format lib/src/serializers/serializer.dart.)
  • lib/src/serializers/types/bool.dart (Run dartfmt to format lib/src/serializers/types/bool.dart.)
  • lib/src/serializers/types/int.dart (Run dartfmt to format lib/src/serializers/types/int.dart.)
  • lib/src/serializers/types/list.dart (Run dartfmt to format lib/src/serializers/types/list.dart.)
  • lib/src/serializers/types/null.dart (Run dartfmt to format lib/src/serializers/types/null.dart.)
  • lib/src/serializers/types/string.dart (Run dartfmt to format lib/src/serializers/types/string.dart.)
  • lib/src/serializers/types/void.dart (Run dartfmt to format lib/src/serializers/types/void.dart.)

Maintenance issues and suggestions

Provide a file named (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

Package is getting outdated. (-45.75 points)

The package was last published 76 weeks ago.

The package description is too short. (-13 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is pre-release. (-5 points)

Pre-release versions should be used with caution; their API can change in breaking ways.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and bloc_cli.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
meta ^1.1.7 1.1.8 1.2.0
Dev dependencies
rxdart any