context_plus_lint 2.0.0 copy "context_plus_lint: ^2.0.0" to clipboard
context_plus_lint: ^2.0.0 copied to clipboard

Analyzer plugin rules and assists for context_plus

context_plus.webp

Visit context-plus.sonerik.dev for more information and interactive examples.

context_plus_lint #

A set of analyzer plugin rules, quick fixes, and assists that improve the developer experience with context_plus.

  • Detect and auto-fix incorrect context.use() before receiving an assertion at runtime
  • Automatically create and assign context.use()d values to a new Ref
  • Detect and auto-fix incorrect Ref definitions

Requires Dart 3.10 (Flutter 3.38) or later—the analysis_server_plugin stack this package builds on needs an analyzer that matches the SDK.

Installation #

Enable the plugin by adding a top-level plugins entry to analysis_options.yaml at the package (or workspace) root (nested option files cannot enable plugins):

plugins:
  context_plus_lint: ^2.0.0

Rules are registered as warning rules and are on by default. After changing plugins, restart the Dart Analysis Server so the IDE picks up the plugin.