Exploring Static Code Analysis techniques in Flutter
summary
A tiny Flutter app called Magic Beast gets refactored purely by static checks run on CI using GitHub Actions, flutter format, flutter analyze and dart fix; enabling all lints surfaces about 70 then 163 issues as the analysis tightens, and Dart Code Metrics (DCM) finds duplicate widgets and unused files, collapsing five near-identical beast widgets into one reusable component; dependency and duplication checks run, some fixes are autoapplied, and a custom lint enforces the Firebase Analytics 40-char rule with an autofix.
AI-written summary · about
chapters (14)
- 0:00Static analysis in Flutter
- 2:56Magic Beast demo app setup
- 4:20Code formatting checks in CI
- 6:04Dart and Flutter lints config
- 9:10Strict code quality with all lints
- 12:24DCM for advanced analysis
- 16:15Custom DCM lints
- 17:22Unused dependencies detection
- 18:28Duplicate and unused code
- 19:29Widget similarity analysis
- 22:41Custom lints for Firebase Analytics
- 28:19Advanced analysis techniques
- 29:47Automating fixes and workflows
- 30:08Robust analysis system summary
related talks
40mBeyond the widgets Evaluating Flutter apps with code assessments
30mAccelerating the Dev Loop with DCM Lints at Betterment
18mOptimize your productivity with Flutter developer tooling
16mEnsuring quality throughout the application lifecycle
22mScaling Static Code Analysis Adoption at WhatsApp iOS
45mAnalyze This
37mFirst Do No Harm
41mFirst, Do No Harm
