Flutter¶
Flutter-specific checks: pubspec health, dependencies, assets, and ARB localization integrity.
20 checks.
flutter-cross-package-duplicate¶
Severity:
Duplicate assets across packages inflate the final app bundle size unnecessarily.
How to fix: Create a shared assets package (e.g. packages/shared_assets/assets/) and move duplicates there, then reference it from each package's pubspec.yaml. This would save ~….
flutter-dependency-overrides¶
Severity: Medium
Dependency overrides mask version conflicts and can hide incompatibilities that surface only in production or when the overrides are removed.
How to fix: Resolve the underlying version conflicts so that dependency_overrides are no longer needed, or document why each override is required.
flutter-git-dependency¶
Severity:
git and external-path dependencies in production are non-reproducible and bypass pub.dev versioning. They can change underneath you and are a supply-chain risk.
How to fix: Publish the package to pub.dev and depend on a version, or pin the git dependency to an immutable ref (commit SHA).
flutter-heavy-dependency¶
Severity: Info
Heavy dependencies increase binary size, startup time, and may introduce complex native build requirements.
How to fix: Evaluate whether each heavy dependency is essential. Consider lighter alternatives or lazy-loading where possible.
flutter-heavy-svg¶
Severity: Medium
Complex SVG constructs (filters, masks, embedded images) are re-evaluated on every frame by flutter_svg, causing jank and increased GPU/CPU usage.
How to fix: Consider converting these SVGs to PNG or WebP for better rendering performance. If an SVG is used at multiple sizes, keeping it as vector may be preferable — in that case, try simplifying the heavy constructs.
flutter-large-workspace¶
Severity: Low
Very large workspaces increase dependency resolution time, CI build duration, and make it harder to reason about package boundaries.
How to fix: Consider splitting the monorepo into smaller workspaces or using Melos/very_good_cli for better package management.
flutter-localization-extra-keys¶
Severity: Low
Keys that exist only in non-template locales are dead translations that drift from the source of truth.
How to fix: Remove keys no longer in the template, or add them to the template if still needed.
flutter-localization-invalid-arb¶
Severity: High
An unparseable .arb file breaks gen-l10n / intl code generation for the whole build.
How to fix: Fix the JSON syntax (trailing commas, unescaped quotes) in the listed ARB files.
flutter-localization-invalid-metadata¶
Severity: Low
Malformed @-metadata (orphan @key or a non-object value) is ignored or rejected by gen-l10n and signals an editing mistake.
How to fix: Ensure every @key has a matching translation key and that its value is an object.
flutter-localization-missing-keys¶
Severity: Low
Keys present in the template locale are missing from other locales, so users there see the fallback language.
How to fix: Add the missing keys to each locale, or remove them from the template if unused.
flutter-localization-overview¶
Severity: Info
Understanding localization scope helps plan translation maintenance and detect unused strings.
How to fix: Review ARB files for unused keys and ensure all supported locales are complete.
flutter-localization-placeholder-metadata-drift¶
Severity: Low
Divergent @-metadata placeholder definitions across locales signal copy-paste drift and can confuse tooling.
How to fix: Keep @-metadata only in the template locale, or keep it identical across locales.
flutter-localization-placeholder-mismatch¶
Severity: Medium
A translation whose placeholder set differs from the template causes wrong substitutions or runtime format errors.
How to fix: Align each translation's placeholders ({name}, {count}) with the template message.
flutter-missing-analysis-options¶
Severity: Medium–Low
Without standard static-analysis rules, code style drifts and unsafe code goes unchecked, allowing avoidable bugs to reach production.
How to fix: Add an analysis_options.yaml (a single one at the repo/workspace root covers all nested packages) with include: package:flutter_lints/flutter.yaml.
flutter-missing-declared-asset-path¶
Severity: Medium
Declared but missing assets cause runtime errors or build failures. Flutter will fail to bundle assets it cannot locate, leading to broken images or crashes.
How to fix: Remove stale entries from flutter.assets in pubspec.yaml, or add the missing files to the expected paths.
flutter-missing-font-asset¶
Severity: Medium
Missing font files cause build failures or silent fallback to the default font, leading to inconsistent typography across the app.
How to fix: Add the missing font files to the declared paths, or remove stale font entries from pubspec.yaml.
flutter-pubspec-overview¶
Severity: Info
Understanding pubspec configuration helps identify bloat sources and dependency risks.
How to fix: Review dependency count and asset declarations for optimization opportunities.
flutter-split-debug-missing¶
Severity: Medium
Without --split-debug-info, debug symbols are included in the release binary, increasing size. Without --obfuscate, Dart code is not obfuscated, making reverse engineering easier.
How to fix: Add --split-debug-info=build/debug-info --obfuscate to flutter build commands for release builds.
flutter-unused-asset¶
Severity: Medium
Unused assets are bundled uncompressed into the APK/IPA, directly increasing download size without providing any value to the user.
How to fix: Search for references with: grep -r "…" lib/ — if no results, remove "…" from pubspec.yaml and delete the file.
flutter-vendored-packages¶
Severity: Medium
Vendored packages are local forks that miss upstream updates, security patches, and bug fixes. They also increase maintenance burden.
How to fix: For each vendored package, check if upstream has merged your changes. If so, switch back to the published version. If not, consider submitting a PR upstream.