首页/ AI 技能 / @skilllib/skill-2117939930272413934
Skill站外收录 @skilllib/skill-2117939930272413934

performance

面向 Flutter 应用的性能优化规范,聚焦于减少不必要的界面重建、高效管理列表渲染、隔离耗时计算任务、控制重绘区域,并优化图片加载与缓存策略,确保稳定 60fps 的流畅体验。

0.0 (0) 21 次安装 原作者 编程导航
收录于 2026-01-22
软件开发 AI 技能

Skills.MD

# Performance ## **Priority: P1 (OPERATIONAL)** Performance optimization techniques for smooth 60fps Flutter applications. - **Rebuilds**: Use `const` widgets and `buildWhen` / `select` for granular updates. - **Lists**: Always use `ListView.builder` for item recycling. - **Heavy Tasks**: Use `compute()` or `Isolates` for parsing/logic. - **Repaints**: Use `RepaintBoundary` for complex animations. Use `debugRepaintRainbowEnabled` to debug. - **Images**: Use `CachedNetworkImage` + `memCacheWidth`. `precachePicture` for SVGs. ```dart BlocBuilder<UserBloc, UserState>( buildWhen: (p, c) => p.id != c.id, builder: (context, state) => Text(state.name), ) ```

评论 0

还没有评论,来抢沙发。