flutter-ui
Installation
SKILL.md
1. Performance & Rendering
- Const-First: Every widget that can be
constMUST beconst. - Lazy Rendering: Use
SliverList.builderorSliverGrid.builderfor lists > 10 items. - Repaint Boundaries: Wrap complex animations in
RepaintBoundary. - Isolate Parsing: Use
compute()orIsolatefor JSON > 1MB. - BuildContext Safety: Check
mountedbefore usingcontextacross async gaps.
2. Design Tokens (Theming)
Use AppColors, AppSpacing, AppRadius, and AppTypography. NEVER hardcode raw values.
- Colors: Use
context.colorScheme.primaryorAppColors. Support light/dark modes. - Spacing: Use
AppSpacing.sm(8),AppSpacing.md(16), etc. UseSizedBoxfor gaps. - Radius: Use
AppRadius.md(12) for consistent rounding. - Typography: Use
context.textTheme.bodyMedium. Support text scaling.