Skip to content
pubscout

riverpod_lint

3.2.0, released 2 weeks ago by an unverified publisher

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

$ flutter pub add riverpod_lint
Source repository

What it does

It runs as an analysis_server_plugin, providing lint rules and assists for Riverpod code. It warns about missing ProviderScope, improper family usage, and offers refactorings to ConsumerWidget variants.

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

Use it when

  • You use Riverpod and want to catch common mistakes early
  • You need automated refactorings for ProviderScope or ConsumerWidget patterns

Skip it when

  • You prefer to write custom lints or use a different linting framework

Strengths

  • Zero runtime cost, integrates with dart analyze
  • Provides quick fixes and refactorings
  • Keeps codebase consistent with Riverpod best practices

Weaknesses

  • Only works with Riverpod, not other state managers
  • Requires Dart 3.13 due to analysis_server_plugin dependency

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
10

Add riverpod_lint to analysis_options.yaml under plugins, no build_runner needed

// analysis_options.yaml
plugins:
  riverpod_lint: 3.2.0

Alternatives

Packages that do the same job and could replace riverpod_lint.

  • bloc_lint

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

  • flame_lint

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

  • dart_code_linter

    A software analytics and static analysis tool for checking code metrics, lint rules, and unused code.

  • bloc_test

    A testing library that makes it easy to test blocs and cubits.

Works with

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