FL
Flutter Performance
Optimization standards for rebuilds and memory.
Install
mkdir -p .claude/skills/flutter-performance && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15552" && unzip -o skill.zip -d .claude/skills/flutter-performance && rm skill.zipInstalls to .claude/skills/flutter-performance
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Optimization standards for rebuilds and memory.47 charsno explicit “when” trigger
About this skill
Performance
Priority: P1 (OPERATIONAL)
Performance optimization techniques for smooth 60fps Flutter applications.
- 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.
🚫 Anti-Patterns
- Large Rebuilds:
**No SetState at Root**: Use granular builders (BlocBuilder, Consumer). - Logic in Build:
**No Heavy Work in body**: Perform parsing/sorting in the Business Layer. - Missing Const:
**No Dynamic Leaf Widgets**: Use const where possible.
BlocBuilder<UserBloc, UserState>(
buildWhen: (p, c) => p.id != c.id,
builder: (context, state) => Text(state.name),
)