Flutter Performance
SKILL.md
Performance (P1)
- 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.
BlocBuilder<UserBloc, UserState>(
buildWhen: (p, c) => p.id != c.id,
builder: (context, state) => Text(state.name),
)