Flutter performance
Skill ComeOnOliver/skillshub/skills/HoangNguyen0403/agent-skills-standard/flutter-performance
π§ The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.
npx -y skills add ComeOnOliver/skillshub --skill flutter-performanceAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
Optimization standards for rebuilds and memory. Use when optimizing Flutter widget rebuilds, reducing memory usage, or improving rendering performance. (triggers: lib/presentation/**, pubspec.yaml, const, buildWhen, ListView.builder, Isolate, RepaintBoundary)
SKILL.md
1.8 KB, 402 tokens by cl100k_base, as published. Nobody here has run it
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
- β
setState()at the root/page level to update a single counter β useBlocBuilderwithbuildWhenorcontext.select()for granular rebuilds - β Sorting/filtering a list inside
build()β move heavy computation to BLoC or usecompute() - β Non-
constleaf widgets that never change β always applyconstto static widgets to skip reconciliation - β
Column(children: items.map((e) => ItemWidget(e)).toList())for large lists β useListView.builderfor item recycling
BlocBuilder<UserBloc, UserState>(
buildWhen: (p, c) => p.id != c.id,
builder: (context, state) => Text(state.name),
)