DevTools is great for manual profiling, but I wanted the other 90% of the
time: a one-tap, repeatable audit I can run on every build and paste into a PR.
So I built flutter_lighthouse. You wrap your app, tap a button, and it:
- auto-walks your routes (push → dwell → scroll → collect → pop)
- scores performance 0–100 using Chrome Lighthouse's log-normal curves
- lists findings with severity + a fix + a code example:
- "FeedItem rebuilt 2562× on /feed" → wrap in const / Selector
- "hero.jpg decoded 28× larger than displayed" → set cacheWidth
- "30 frames >100ms on /heavy" → move work off the UI thread
- exports JSON (CI), Markdown (PR), HTML (shareable)
Detection is real, not guessed: rebuild counts via an opt-in LighthouseProbe,
oversized images via debugOnPaintImage (decoded vs displayed), frame timing via
addTimingsCallback. Scoring is deterministic and documented (SCORING_SPEC.md).
I validated it on an intentionally-bad example app — catches all the planted
regressions with 0 false positives. 54 tests, analyze clean.
pub.dev: https://pub.dev/packages/flutter_lighthouse
GitHub: https://github.com/jayu1023/flutter_lighthouse
It's v0.1.0 — feedback very welcome, especially on scoring weights and false
positives in real apps. What would you want audited next (network? bundle size?)

Top comments (0)