Official lint rules for development when using the bloc state management library.
Learn more at bloclibrary.dev!
This package is built to work with:
Sponsors
Our top sponsors are shown below! [Become a Sponsor]
|
|
|
Quick Start
-
Install the bloc command-line tools
dart pub global activate bloc_tools -
Install the bloc_lint package
dart pub add --dev bloc_lint -
Add an
analysis_options.yamlto the root of your project with the recommended rulesinclude: package:bloc_lint/recommended.yaml -
Run the linter
bloc lint .
For more information, check out the official documentation
Recommended Lint Rules
- avoid_flutter_imports
- avoid_public_bloc_methods
- avoid_public_fields
- prefer_file_naming_conventions
- prefer_void_public_cubit_methods
All Lint Rules
- avoid_build_context_extensions
- avoid_flutter_imports
- avoid_public_bloc_methods
- avoid_public_fields
- prefer_bloc
- prefer_build_context_extensions
- prefer_cubit
- prefer_file_naming_conventions
- prefer_void_public_cubit_methods
Dart Versions
- Dart 3: >= 3.7.0


