Documentation Flutter · Menu
PLATFORM / FLUTTER

Flutter static analysis with Guardian

A Flutter application is really three things at once: shared Dart code, an iOS target and an Android target. Each store judges its own half, which is why a single review that covers all three is worth more here than on either native platform alone.

Detection

Run detection from the application directory. A Flutter project with both native targets is reported as all three, and each target contributes its own analysis paths.

Terminal
guardian detect .

In a repository containing several Flutter apps, point Guardian at one application directory. Scanning the repository root will detect the wrong project shape.

What Guardian reads

AreaWhy it is read
Project manifest and lockfileDependency inventory, version constraints, and the reproducibility of the build you are shipping.
Dart sourceCode-quality signals, including error paths that discard a failure rather than surfacing it.
Android target configurationRelease build and network configuration for the Android half of the application.
iOS target configurationRelease metadata and declared capabilities for the iOS half.

Nothing is transmitted to read any of this. Theaccess methods page covers the boundary in full.

Review workflow

Terminal
guardian detect .
guardian release check
guardian scan . --format html --output guardian-report.html

Read the findings alongside the coverage list. On a Flutter project the coverage list is where you find out that one target was analysed more thoroughly than the other, which is information you want before a submission rather than after.

Current limits

  • Which platform checks apply depends on how your native targets are structured. Checks that could not run are reported as incomplete, never as passed.
  • Guardian analyses the project as written. Anything a build step generates is only visible if it exists at scan time.
  • Most individual Flutter-specific checks are in preview. Thechecks catalogue gives each one its own status rather than implying uniform coverage.
  • Dart is not the only source of risk in a Flutter application. Plugins bring native code with them, and that is covered by dependency review rather than by source analysis of your own code.

iOS specifics