skills/dart/dart-tooling/SKILL.md
Run Dart tooling workflows for static analysis, dependency conflict resolution, and test migration to package:checks. Use when fixing analyzer errors, resolving pub dependency conflicts, or modernizing test assertions.
npx skillsauth add dhruvanbhalara/skills dart-toolingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this sequential workflow to identify, fix, and verify static analysis errors in a Dart project.
dart analyze . --fatal-infosdart fix --dry-rundart fix --applydart fix couldn't automatically resolve.dart analyze . and dart test pass.When pub get fails due to incompatible package versions, use this systematic approach.
dart pub outdated| Column | Meaning |
|---|---|
| Current | Version in pubspec.lock right now |
| Upgradable | Latest version allowed by pubspec.yaml constraints |
| Resolvable | Latest version that CAN be resolved with all other deps |
| Latest | Latest published version (ignoring constraints) |
dart pub outdated
^1.2.3 — allows non-breaking updates up to next major version.dev_dependencies.dart pub get --enforce-lockfile in CI to ensure exact tested versions.If updating to "Upgradable" versions:
dart pub upgrade
dart pub upgrade --tighten # Auto-update lower bounds in pubspec.yaml
If updating to "Resolvable" versions (major):
pubspec.yaml to bump constraints.dart pub upgrade.dart analyze → fix breaking API changes.dart test → fix regressions.NEVER delete the entire pubspec.lock. This causes uncontrolled upgrades across the dependency graph.
Instead, remove ONLY the conflicting package's block:
pubspec.lock.dart pub get — fetches newest compatible version for that package only.dart pub deps → check dependency graph resolves correctly.dependency_overrides:
shared_package: ^x.y.z # Remove once direct deps support newer version
Transition test assertions from the package:matcher syntax to the literate API provided by package:checks for more readable output.
dev_dependency checks via dart pub add dev:checks.expect(actual, equals(expected)) with check(actual).equals(expected).expect(actual, isA<Type>()) with check(actual).isA<Type>().await check(Future.value(10)).completes((it) => it.equals(10));package:checks and import package:checks/checks.dart.expect() calls to check().development
Perform REST API networking operations (GET, POST, PUT, DELETE) using the lightweight and robust standard `http` package, including platform configurations and background parsing models.
development
Configure internationalization and localization support using Flutter's built-in l10n system, App Resource Bundle (ARB) files, and ICU formatting syntax.
development
Create model classes with fromJson/toJson using dart:convert and Dart 3 pattern matching. Use when manually mapping JSON to classes, parsing HTTP responses, or choosing between manual and code-generated serialization.
data-ai
Diagnose and fix Flutter layout constraint violations (RenderFlex overflow, unbounded height/width, ParentData misuse). Use when encountering layout exceptions, yellow-black overflow stripes, or red error screens.