Skip to content
pubscout

flutter_hooks_lint_plugin

0.8.0, released 3 months ago by an unverified publisher

A Dart analyzer plugin providing lint rules for flutter_hooks.

$ flutter pub add flutter_hooks_lint_plugin
Source repository

What it does

It detects missing or unnecessary keys in useEffect calls and identifies nested hooks inside control flow statements. It helps enforce proper rules of hooks and maintain clean hook code.

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

Use it when

  • You are using flutter_hooks in your project
  • You want to enforce missing/unnecessary key checks for useEffect
  • You want to prevent nested usage of hooks inside control flow

Skip it when

  • You are not using flutter_hooks in your application

Strengths

  • Catches common bugs with missing dependencies in useEffect
  • Prevents rules of hooks violations like nesting hooks in control flow
  • Configurable via analysis_options.yaml

Weaknesses

  • Requires analyzer plugin configuration in analysis_options.yaml and IDE restarts

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
5

Add the plugin directive to analysis_options.yaml and run flutter pub get.

plugins:
  flutter_hooks_lint_plugin:
    version: ^0.8.0
    diagnostics:
      exhaustive_keys: true
      rules_of_hooks: true

Alternatives

Packages that do the same job and could replace flutter_hooks_lint_plugin.

  • very_good_analysis

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

  • lints

    Official Dart team lint rules for core and recommended static analysis settings.

  • bloc_lint

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

  • pedantic_mono

    Recommended lints for Flutter apps, packages, and plugins to encourage good coding practices.

Works with

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