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.
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.
82Compare - replay_bloc
Adds automatic undo and redo support to bloc and cubit states.
80Compare - riverpod
A reactive caching and data-binding framework. Riverpod makes working with asynchronous code a breeze.
99Compare - flutter_riverpod
A reactive caching and data-binding framework for Flutter.
93Compare
Works with
Packages commonly used together with bloc_tools: ones it builds on, ones built on it, and its own family.
- argsbloc_tools depends on itLibrary for parsing raw command-line arguments into options and values using GNU and POSIX styles.
- pub_updaterbloc_tools depends on itChecks if a pub package is up to date and can trigger updates
- masonbloc_tools depends on itDart template generator for quick file creation
- bloc_lintbloc_tools depends on itOfficial lint rules for development when using the bloc state management library.
- blocSame familyA Dart library for implementing the BLoC pattern with Cubits and Blocs.
- flutter_blocSame familyFlutter widgets to easily integrate blocs and cubits for state management.
- bloc_testSame familyA testing library that makes it easy to test blocs and cubits.
- bloc_concurrencySame familyCustom event transformers for the bloc state management package.