flutter-design-tokens
Installation
SKILL.md
When to Use
- Creating new widgets or components
- Refactoring existing components to remove magic numbers
- Reviewing PRs for hardcoded spacing/sizing values
- Establishing consistent visual rhythm
Critical Rules
- NEVER use raw numbers for spacing, sizes, or radii — always use tokens
- Import via barrel:
import 'package:bastet/app/theme/tokens.dart'; - Pick semantic tokens that match intent, not just value
Token Classes
| Class | Purpose | Example |
|---|---|---|
AppSpacing |
Padding, margins, gaps | AppSpacing.lg (16px) |
AppSizes |
Icons, buttons, avatars | AppSizes.touchTarget (48px) |
Related skills