flutter-performance
Optimization standards for rebuilds and memory.
Installation
Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.
Voir la source ↗GuidesInstructions
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.
🚫 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),
)
Exemples
Consultez les exemples du dépôt source.
Voir la source ↗Historique source
- Date d’indexation
- 2026-01-20
- Mise à jour de l’index
- 2026-01-26
- Branch
- main
Les dates concernent ce répertoire. Consultez le dépôt pour l’historique du code.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!