flutter-theming

Builds Flutter Material 3 themes with seed colors, dark mode, and ThemeExtension brand tokens.

Updated Jun 13, 2026
One-click install
npx skills add https://github.com/22Teikk/22Teikk-Agent-Skills-Hub --skill flutter-theming-22teikk
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: flutter-theming
Source: https://github.com/22Teikk/22Teikk-Agent-Skills-Hub/tree/main/packs/flutter/skills/flutter-theming
Command: npx skills add https://github.com/22Teikk/22Teikk-Agent-Skills-Hub --skill flutter-theming-22teikk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Flutter apps with a custom visual identity often end up with hardcoded colors, broken dark mode, and deprecated Material 2 APIs scattered across widgets. This Skill provides a canonical, single-source-of-truth approach to Material 3 theming so colors, typography, and component styling stay consistent, accessible, and rebrandable. ## Core Features & Use Cases - Seed-based color schemes: Derive light and dark palettes from one brand seed with ColorScheme.fromSeed, including DynamicSchemeVariant.fidelity for vivid brand colors. - Dark mode wiring: Configure theme, darkTheme, and themeMode on MaterialApp, and read platform brightness correctly with MediaQuery.platformBrightnessOf. - Brand tokens via ThemeExtension: Define custom spacing, radii, and brand colors with const constructors, copyWith, and lerp so themes animate across light/dark transitions. - Typography and component themes: Set a TextTheme ramp once and tune cards, app bars, and inputs with the current *ThemeData classes instead of per-widget styling. - Use Case: When building a new Flutter app with brand guidelines, use this Skill to create lib/core/theme/app_theme.dart with a seed-derived ColorScheme, an AppSpacing ThemeExtension, and a system-following dark mode, then verify with flutter analyze. ## Quick Start Ask the agent to set up Material 3 theming for your Flutter app with a brand seed color, dark mode support, and custom spacing tokens in lib/core/theme.

Frequently Asked Questions about flutter-theming

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add dark mode to a Flutter app with Material 3?▼

Pass both theme and darkTheme to MaterialApp and set themeMode to ThemeMode.system so the app follows the OS setting. Derive both brightnesses from the same seed with ColorScheme.fromSeed so brand identity survives the light-to-dark transition.

How do I create custom theme tokens in Flutter with ThemeExtension?▼

Subclass ThemeExtension with a const constructor and implement copyWith and lerp, then register instances in ThemeData extensions. Read values anywhere with Theme.of(context).extension<YourExtension>() so tokens animate correctly across theme changes.

Should I use ColorScheme.fromSeed or Material You dynamic color in Flutter?▼

Use a fixed ColorScheme.fromSeed by default since it gives an identical brand palette on every device and works on iOS, web, and desktop. Material You dynamic color is Android-only and opt-in via the dynamic_color package; pick one strategy per app, never mix both behind a flag.

Why is useMaterial3 deprecated in Flutter?▼

Material 3 has been the default since Flutter 3.16, so the useMaterial3 flag is deprecated noise in new code. Writing it explicitly adds nothing and should be removed along with deprecated roles like background and surfaceVariant.

Why does my Flutter theme crash when switching dark mode?▼

Crashes during theme transitions usually come from a ThemeExtension subclass missing its lerp implementation, which the framework uses to animate between themes. Also ensure ThemeData is built once as a top-level final rather than constructed inside build().