Skip to content
pubscout

bloc_tools

0.1.0-dev.25, released 8 weeks ago by bloclibrary.dev

Command-line tools for generating and linting bloc and cubit components.

WASM-ready
$ flutter pub add bloc_tools
Source repository

What it does

Provides command-line tools to scaffold new bloc, cubit, hydrated_bloc, hydrated_cubit, replay_bloc, and replay_cubit components. It also includes an official bloc linter command to analyze source code.

AI-written summary of version 0.1.0-dev.25, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want to quickly scaffold new bloc or cubit files from templates
  • You want to enforce bloc-specific code quality and consistency rules via CLI linting

Skip it when

  • You are looking for runtime state management widgets or libraries
  • You manage your project workflow without using Dart global CLI tools

Strengths

  • Automates the creation of boilerplate code for multiple bloc variants
  • Integrates official bloc linting commands

Weaknesses

  • Requires global activation via pub
  • Limited to command-line utility functions

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
6

Install globally using `dart pub global activate bloc_tools`.

dart pub global activate bloc_tools
bloc new bloc --name counter
bloc lint .

Alternatives

Packages that do the same job and could replace bloc_tools.

  • yx_state

    A state management library for Dart and Flutter applications.

  • replay_bloc

    Adds automatic undo and redo support to bloc and cubit states.

  • riverpod

    A reactive caching and data-binding framework. Riverpod makes working with asynchronous code a breeze.

  • flutter_riverpod

    A reactive caching and data-binding framework for Flutter.

Works with

Packages commonly used together with bloc_tools: ones it builds on, ones built on it, and its own family.