| name | flutter-ux-theming |
| description | Apply consistent Flutter UX and theming standards using Material 3, ThemeData, ColorScheme, ThemeExtension tokens, and component themes. Use when building or refactoring Flutter screens, introducing design tokens, changing theme behavior, adding dark/light modes, or reviewing UI code for theming consistency and reuse. |
Flutter Ux Theming
Overview
Produce UI changes that are token-driven, theme-first, and component-composed.
Avoid one-off styling and custom component sprawl.
Workflow
- Identify the current theme entry points and component usage.
- Normalize theme structure around
ThemeData, ColorScheme, and component themes.
- Move custom semantic tokens into
ThemeExtension types.
- Replace inline styles with theme-aware composition.
- Validate light, dark, and system behavior paths.
- Confirm accessibility and responsive behavior.
- Output changed files plus a brief verification checklist.
Decision Rules
- Prefer Material components before custom widgets.
- Prefer composing existing widgets before creating new abstractions.
- Use custom wrappers only for repeated behavior or strict product semantics.
- Keep tokens semantic and intent-based, not raw color names.
- Keep design primitives centrally defined and versioned.
- Keep per-screen overrides minimal and local.
Required Output Elements
- Theme architecture summary.
- Token model summary.
- Component composition strategy.
- List of inline-style removals or remaining exceptions.
- Accessibility and responsive checks run.
Verification Checklist
theme, darkTheme, and themeMode are all configured.
ColorScheme is the source of truth for component colors.
ThemeExtension is used for non-Material semantic tokens.
- Component themes are used for buttons, fields, cards, app bars, and nav bars.
- No uncontrolled hardcoded colors or text styles remain in changed features.
- Large-screen layout behavior is based on available width, not device type checks.
Reference Files
- Standards and checklist:
references/flutter-ux-theming-checklist.md
Load this file for detailed rules before implementing Flutter UI/theming changes.