Loading...
Loading...
Runs the deterministic build_runner codegen pass (drift_dev, freezed, json_serializable, riverpod_generator) as one pinned command with --delete-conflicting-outputs, always before flutter analyze, never hand-editing or force-committing generated *.g.dart / *.freezed.dart / *.drift.dart output, watch only in local dev. Use when regenerating codegen, fixing "missing part file" / "conflicting outputs" / undefined generated-class analyzer errors, after editing a drift table or DAO, a freezed value object, a riverpod Notifier or provider, or a json_serializable model, or after a fresh git clone, branch switch, or pull.
npx skill4agent add zakariaf/flutter-skills run-codegen@freezed@JsonSerializable@riverpod@DriftDatabase*.g.dart*.freezed.dart*.drift.dartflutter analyze--delete-conflicting-outputsgit add -fcodegen-and-toolchainwatchbuildlib/dart run build_runner build --delete-conflicting-outputsflutter pub getdart run build_runner build --delete-conflicting-outputsflutter analyzedart run build_runner watch --delete-conflicting-outputsbuildmelos run genbuild.yamlcodegen-and-toolchain| Symptom | Do this |
|---|---|
| Analyzer flags an undefined class/getter that codegen should produce | Rerun the pinned build, then restart the analysis server. Do not "fix" the call site. |
Errors reported inside a | The file is stale or the analyzer excludes are wrong. Regenerate first; never hand-edit generated output. |
| build_runner fails with analyzer errors in hand-written source | Fix the hand-written source — the generator cannot resolve an unanalyzable AST. |
| "Conflicting outputs" wall of text | Re-run with |
flutter analyze--delete-conflicting-outputs.g.dart.freezed.dart.drift.dartgit add -fbuild_runner watchbuilddart run build_runner build --delete-conflicting-outputsflutter analyzebuild_runner watchcodegen-and-toolchainbuild.yamlrun-migrationdrift_dev make-migrationsci-pipeline-and-gateslint-and-style-config