Flutter Theme Factory Skill
This skill provides a curated collection of professional Flutter ThemeData configurations, each with carefully selected color palettes, Google Fonts pairings, and component-level theming. Once a theme is chosen, it generates production-ready Dart code.
Purpose
To apply consistent, professional styling to any Flutter application. Each theme includes:
- A cohesive
ColorSchemewith light and dark variants - Complementary Google Fonts pairings for display, headline, title, body, and label text
- Component-level theming (
AppBarTheme,CardTheme,ElevatedButtonTheme,InputDecorationTheme, etc.) - A distinct visual identity suitable for different contexts and audiences
Usage Instructions
- Show available themes: Present the theme list below with descriptions
- Ask for their choice: Ask which theme to apply
- Wait for selection: Get explicit confirmation about the chosen theme
- Generate the theme: Read the selected theme file from
themes/and generate complete Dart code - Deliver files: Provide
app_theme.dart,app_colors.dart,app_typography.dartready to drop into their project
Themes Available
| # | Theme | Vibe | Best For |
|---|---|---|---|
| 1 | Ocean Depths | Professional & calming maritime | Finance, consulting, corporate |
| 2 | Sunset Boulevard | Warm & vibrant energy | Social, lifestyle, food delivery |
| 3 | Forest Canopy | Natural & grounded earth tones | Wellness, sustainability, outdoor |
| 4 | Modern Minimalist | Clean & contemporary grayscale | Productivity, SaaS, developer tools |
| 5 | Golden Hour | Rich & warm autumnal | Photography, luxury, premium |
| 6 | Arctic Frost | Cool & crisp winter-inspired | Healthcare, fintech, analytics |
| 7 | Desert Rose | Soft & sophisticated dusty tones | Fashion, beauty, lifestyle |
| 8 | Tech Innovation | Bold & modern tech aesthetic | Startups, AI/ML, developer |
| 9 | Botanical Garden | Fresh & organic garden colors | Health, organic food, plants |
| 10 | Midnight Galaxy | Dramatic & cosmic deep tones | Gaming, entertainment, music |
| 11 | Neon Tokyo | Cyberpunk, high contrast neon | Gaming, nightlife, tech |
| 12 | Terracotta Studio | Warm clay, artisan craft | Art, handmade, interior design |
Generated Code Structure
Each theme generates:
lib/core/theme/
├── app_theme.dart # ThemeData for light & dark mode
├── app_colors.dart # Color constants & ColorScheme
├── app_typography.dart # Google Fonts TextTheme
└── app_spacing.dart # Consistent spacing scale
app_theme.dart Pattern
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'app_colors.dart';
import 'app_typography.dart';
class AppTheme {
static ThemeData get light => ThemeData(
useMaterial3: true,
brightness: Brightness.light,
colorScheme: AppColors.lightScheme,
textTheme: AppTypography.textTheme,
appBarTheme: AppBarTheme(...),
cardTheme: CardTheme(...),
elevatedButtonTheme: ElevatedButtonThemeData(...),
inputDecorationTheme: InputDecorationTheme(...),
bottomNavigationBarTheme: BottomNavigationBarThemeData(...),
floatingActionButtonTheme: FloatingActionButtonThemeData(...),
chipTheme: ChipThemeData(...),
dividerTheme: DividerThemeData(...),
// ... all component themes
);
static ThemeData get dark => ThemeData(
useMaterial3: true,
brightness: Brightness.dark,
colorScheme: AppColors.darkScheme,
textTheme: AppTypography.textTheme,
// ... dark variants
);
}
app_colors.dart Pattern
import 'package:flutter/material.dart';
class AppColors {
// Brand colors
static const Color primary = Color(0xFF...);
static const Color secondary = Color(0xFF...);
static const Color accent = Color(0xFF...);
static const Color surface = Color(0xFF...);
// Semantic colors
static const Color success = Color(0xFF...);
static const Color warning = Color(0xFF...);
static const Color error = Color(0xFF...);
static const Color info = Color(0xFF...);
// Gradients
static const LinearGradient primaryGradient = LinearGradient(...);
static const LinearGradient backgroundGradient = LinearGradient(...);
// Light scheme
static const ColorScheme lightScheme = ColorScheme(
brightness: Brightness.light,
primary: ...,
onPrimary: ...,
secondary: ...,
onSecondary: ...,
surface: ...,
onSurface: ...,
error: ...,
onError: ...,
// ... all 30+ ColorScheme properties
);
// Dark scheme
static const ColorScheme darkScheme = ColorScheme(
brightness: Brightness.dark,
// ... dark variants
);
}
app_typography.dart Pattern
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
class AppTypography {
static String get _displayFont => GoogleFonts.playfairDisplay().fontFamily!;
static String get _bodyFont => GoogleFonts.sourceSansPro().fontFamily!;
static TextTheme get textTheme => TextTheme(
displayLarge: TextStyle(fontFamily: _displayFont, fontSize: 57, fontWeight: FontWeight.w700),
displayMedium: TextStyle(fontFamily: _displayFont, fontSize: 45, fontWeight: FontWeight.w600),
displaySmall: TextStyle(fontFamily: _displayFont, fontSize: 36, fontWeight: FontWeight.w600),
headlineLarge: TextStyle(fontFamily: _displayFont, fontSize: 32, fontWeight: FontWeight.w600),
headlineMedium: TextStyle(fontFamily: _displayFont, fontSize: 28, fontWeight: FontWeight.w500),
headlineSmall: TextStyle(fontFamily: _displayFont, fontSize: 24, fontWeight: FontWeight.w500),
titleLarge: TextStyle(fontFamily: _bodyFont, fontSize: 22, fontWeight: FontWeight.w600),
titleMedium: TextStyle(fontFamily: _bodyFont, fontSize: 16, fontWeight: FontWeight.w600),
titleSmall: TextStyle(fontFamily: _bodyFont, fontSize: 14, fontWeight: FontWeight.w500),
bodyLarge: TextStyle(fontFamily: _bodyFont, fontSize: 16, fontWeight: FontWeight.w400),
bodyMedium: TextStyle(fontFamily: _bodyFont, fontSize: 14, fontWeight: FontWeight.w400),
bodySmall: TextStyle(fontFamily: _bodyFont, fontSize: 12, fontWeight: FontWeight.w400),
labelLarge: TextStyle(fontFamily: _bodyFont, fontSize: 14, fontWeight: FontWeight.w600),
labelMedium: TextStyle(fontFamily: _bodyFont, fontSize: 12, fontWeight: FontWeight.w500),
labelSmall: TextStyle(fontFamily: _bodyFont, fontSize: 11, fontWeight: FontWeight.w500),
);
}
Application Process
After a preferred theme is selected:
- Read the corresponding theme file from the
themes/directory - Generate complete
app_theme.dart,app_colors.dart,app_typography.dart,app_spacing.dart - Include
pubspec.yamldependency additions (google_fonts, etc.) - Provide usage example in
main.dart:
MaterialApp(
theme: AppTheme.light,
darkTheme: AppTheme.dark,
themeMode: ThemeMode.system,
...
)
- Ensure WCAG AA contrast ratios in both light and dark mode
- Test all Material component themes are properly configured
Create Your Own Theme
For cases where none of the existing themes work:
- Ask the user for: brand colors (if any), mood/vibe, target audience, app category
- Generate a custom theme following the same structure as preset themes
- Give it a descriptive name
- Show a preview widget that demonstrates the theme across key components
- Apply the theme after user approval
Preview Widget
When showing a theme preview, generate a ThemePreview widget that displays:
- Color palette swatches
- Typography samples (all text styles)
- Button variants (elevated, filled, outlined, text)
- Card with content
- TextField / Input
- BottomNavigationBar sample
- Chip variants
- Light vs Dark side-by-side comparison