flutter-performance
Installation
SKILL.md
Performance
Priority: P1 (OPERATIONAL)
- Rebuilds: Use
constwidgets andbuildWhen/selectfor granular updates. - Lists: Always use
ListView.builderfor item recycling. - Heavy Tasks: Use
compute()orIsolatesfor parsing/logic. - Repaints: Use
RepaintBoundaryfor complex animations. UsedebugRepaintRainbowEnabledto debug. - Images: Use
CachedNetworkImage+memCacheWidth.precachePicturefor SVGs. - Keys: Provide
ValueKeyfor list items and stable IDs for reconciliation. - Resource Cleanup: Dispose controllers/streams in
dispose(). - Pagination: Default to 20 items per page for network lists.
- Build Purity: Keep
buildmethods free of heavy work; move logic to BLoC/Application. - Image Resizing: Always set
maxWidth/maxHeightwhen loading images.