Review Flutter components and screens for UX/UI compliance. Trigger: When user invokes /ux-review command or requests UX audit.
/ux-review <path>First, load these skills for reference:
flutter-ux-rules — Core UX rulesflutter-design-tokens — Token definitionscorporate-colors — Color paletteIf path is a directory, find all .dart files in:
atoms/molecules/organisms/templates/pages/widgets/If path is a file, review that single file.
For each file, verify:
GestureDetector have 48x48 dp minimumAppSizes.touchTarget used for tap areasColor(0xFF...) — use context.theme.colors.*fontSize: N — use context.theme.typography.*AppSpacing.*AppRadii.*AppSizes.*onPressed: null has visual disabled statesemanticLabelsemanticLabelOutput format:
# UX Review: {path}
## Summary
- Files reviewed: N
- ✅ Compliant: N
- ⚠️ Warnings: N
- ❌ Violations: N
## Violations (must fix)
### {filename}
- **Line N**: Magic number `padding: 17` — use `AppSpacing.*`
- **Line N**: Missing `semanticLabel` on Icon
## Warnings
### {filename}
- **Line N**: Consider using `AppSizes.touchTarget` instead of `48`
## Suggestions
- Consider extracting repeated padding pattern to a constant
- Form could benefit from autofill hints
## Compliant ✅
- {filename}: All checks passed
| Pattern | Severity | Message |
|---|---|---|
Color(0xFF...) | ❌ Violation | Use context.theme.colors.* |
fontSize: N | ❌ Violation | Use context.theme.typography.* |
EdgeInsets.all(N) where N not in tokens | ⚠️ Warning | Use AppSpacing.* |
BorderRadius.circular(N) | ⚠️ Warning | Use AppRadii.* |
width: N, height: N for tap targets | ⚠️ Warning | Use AppSizes.touchTarget |
Icon(...) without semanticLabel | ❌ Violation | Add semanticLabel |
onPressed: null without opacity change | ❌ Violation | Disabled needs visual feedback |
# Review single file
/ux-review lib/shared/presentation/atoms/app_button.dart
# Review directory
/ux-review lib/shared/presentation/atoms/
# Review entire feature
/ux-review lib/features/auth/presentation/
flutter-ux-rules skill assets/ux_review_checklist.mdflutter-design-tokens skill