Skip to content
pubscout

flutter_lints

6.0.0, released a year ago by flutter.dev

Provides the recommended set of Flutter lint rules for static analysis.

WASM-readyQuiet but busy
$ flutter pub add flutter_lints
Source repository

What it does

The package bundles a curated collection of lint rules built on top of Dart's recommended lints. It helps enforce consistent coding style and catches common mistakes across Flutter apps, packages, and plugins.

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

Use it when

  • You want a ready‑made, opinionated lint configuration for new or existing Flutter projects
  • You need to enforce best‑practice coding standards without writing custom rules

Skip it when

  • You require custom lint rules not covered by the package
  • You prefer a minimal lint set and want to manage rules individually

Strengths

  • Easy to adopt via a single dev_dependency
  • Keeps lint rules up‑to‑date with Dart and Flutter releases
  • Well‑documented usage in README

Weaknesses

  • Limited to the rules curated by the package
  • May be too strict for some legacy codebases

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1
# analysis_options.yaml
include: package:flutter_lints/flutter.yaml
linter:
  rules:
    # avoid_print: false  # example of disabling a rule
    # prefer_single_quotes: true  # example of enabling a rule

Alternatives

Packages that do the same job and could replace flutter_lints.

Works with

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