ui-and-design
Installation
SKILL.md
Performance & Rendering
- Const-First: Every widget that can be
constMUST beconst. - Lazy Rendering: Mandatory use of lazy-loading constructs (
SliverList.builderorSliverGrid.builder) for any list exceeding 10 items. - Repaint Boundaries: Wrap complex animations or heavy UI sections in
RepaintBoundaryto optimize Impeller frame budget. - Isolate Parsing: Mandate
compute()orIsolatefor JSON parsing exceeding 1MB to avoid main-thread jank. - Optimize image handling with
cached_network_image - Handle asynchronous operations cleanly with proper cancellation during widget disposal
- Minimize unnecessary rebuilds using memoization techniques
- Implement pagination for large data sets
- Flatten widget hierarchies where reasonable for better rendering performance
- BuildContext Safety: Check
mountedbefore usingcontextacross async gaps to preventsetStateafter dispose.
Design System
See design-system/SKILL.md for full token definitions (colors, spacing, radius, typography), reusable component rules, theming standards, and accessibility. Always use design tokens — never hardcode values.