Skip to content
pubscout

bloc_lint

0.4.3, released 8 weeks ago by bloclibrary.dev

Official lint rules for development when using the bloc state management library.

$ flutter pub add bloc_lint
Source repository

What it does

Provides official static analysis lint rules specifically designed for applications using the bloc state management library. It helps enforce best practices, naming conventions, and architectural constraints across your codebase.

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

Use it when

  • You are developing a Flutter or Dart application using the bloc or cubit state management library.
  • You want to enforce consistent architecture and style guidelines across a team working with blocs.

Skip it when

  • Your project does not use the bloc or cubit state management library.
  • You prefer general-purpose lints and do not want bloc-specific architectural restrictions.

Strengths

  • Provides official rules directly from the creators of the bloc library.
  • Includes recommended rules sets that can be easily included in your analysis_options.yaml.

Weaknesses

  • Strictly tied to the bloc ecosystem.
  • Limited utility outside of bloc-based architectures.

Setup

Kind
Pure Dart
Effort
Low
Code generation
Yes (build_runner)
Direct dependencies
7

Add the dev dependency and include package:bloc_lint/recommended.yaml in your analysis_options.yaml.

include: package:bloc_lint/recommended.yaml

Alternatives

Packages that do the same job and could replace bloc_lint.

  • flame_lint

    A strict and satisfying lint package for Flame, Flutter, or Dart projects.

  • riverpod_lint

    Riverpod_lint is a static analysis plugin that flags common Riverpod mistakes and offers quick refactorings.

  • bdd_framework

    Create BDD tests in Dart code with readable error messages and Gherkin feature file export.

  • very_good_analysis

    Lint rules for Dart and Flutter used internally at Very Good Ventures.

Works with

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