Documentation Flutter · Menu
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.
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
| Area | Why it is read |
|---|---|
| Project manifest and lockfile | Dependency inventory, version constraints, and the reproducibility of the build you are shipping. |
| Dart source | Code-quality signals, including error paths that discard a failure rather than surfacing it. |
| Android target configuration | Release build and network configuration for the Android half of the application. |
| iOS target configuration | Release 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
guardian detect .
guardian release check
guardian scan . --format html --output guardian-report.htmlRead 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.