gskinnerteam/flutter-hatcha-app/theming

Claude Code and agent skill by gskinnerteam/flutter-hatcha-app

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Theme system for the Hatcha app. Use when: working with colors, typography, spacing, dark/light mode, design tokens, AppStyle, context.styles, $theme, $palette, AppColors, AppText, or any styling. Covers all design token tables, palette system, file structure, and customization patterns.

Install

npx vskill@latest install gskinnerteam/flutter-hatcha-app/theming

SKILL.md

Theme System Guide

NOTE: This system is not in a complete state — it has been stubbed in.

The app uses a centralized theme system with design tokens accessible via context.styles (BuildContext extension) and $theme / $palette from service_locator.dart.

When to Use

  • Styling any widget (colors, typography, spacing, corners, shadows)
  • Adding new design tokens
  • Working with dark/light mode or palette switching
  • Understanding the responsive scaling system

Quick Reference

dart
// Via BuildContext extension (preferred)
context.styles.colors.primaryA1 // Palette colors
context.styles.text.h1 // Typography
context.styles.insets.md // Spacing
context.styles.corners.lg // Border radius
context.styles.shadows.card // Shadows
context.styles.times.fast // Animation durations
// Shorthand extensions
context.colors // = context.styles.colors
context.textStyles // = context.styles.text
// Globals (service_locator.dart)
$theme.toggleTheme() // Toggle dark/light
$theme.isDarkMode // Check current mode
$palette.setPalette(palette) // Switch color palette

File Structure

lib/
├── service_locator.dart # $theme, $palette accessors + updateAppStyle()
├── core/logic/
│ ├── theme_controller.dart # Dark/light mode controller
│ └── palette_controller.dart # Swappable color palette controller
└── design_system/
├── styles/
│ ├── styles.dart # AppStyle, AppText, AppInsets + AppStyleContext extension
│ ├── colours.dart # AppColors, AppColorPalette tokens (light/dark)
│ └── color_utils.dart # Color manipulation utilities
└── widgets/
└── app_scaffold.dart # AppStyleScope provider wrapper

Accessing Styles

AppStyleContext Extension (preferred)

Defined in styles.dart, provides three getters on BuildContext:

dart
extension AppStyleContext on BuildContext {
AppStyle get styles => AppStyleScope.of(this);
AppColors get colors => styles.colors;
AppText get textStyles => styles.text;
}

AppStyleScope is an InheritedWidget set up in app_scaffold.dart that provides AppStyle to all descendants.

`$styles` is deprecated. Always use context.styles instead.

Colors (context.colors)

Background
TokenLightDarkUse Case
surfaceWhiteBlack (#000000)Main surface
containerLight grey5% white opacityContainers, subtle depth
highlightMedium grey30% white opacityHighlighted areas
Text
TokenUse Case
textPrimaryPrimary text content
textSecondaryBody text, secondary content (50% opacity)
textTertiaryTertiary/muted text
Raised (Elevated Surfaces)
TokenUse Case
raisedStrongStrong elevation
raisedMediumMedium elevation (cards)
raisedFaintSubtle elevation
Inset (Recessed Areas)
TokenUse Case
insetStrongDeep inset (30% black)
insetMediumMedium inset (20% black)
insetFaintSubtle inset (10% black)
Stroke (Borders & Dividers)
TokenUse Case
stkPrimaryPrimary borders, strong lines
stkSecondaryStandard borders
stkTertiarySubtle dividers, separators
Status
TokenUse Case
successSuccess messages, completed steps
attentionWarnings, cautions, pending items
criticalErrors, destructive actions

Palette System ($palette / context.colors)

Colors are not hardcoded — they come from a swappable AppColorPalette. This enables per-event theming and brand switching.

AppColorPalette (4 swappable tokens)
TokenDefaultDescription
primaryA1#FFE5C07B (gold)Primary theme color
supportA2#FF5E4A26 (dark brown)Support accent
complementB1#FF8A7BFF (purple)Complement color
supportB2#FF2B2452 (dark purple)Support secondary
Factory Constructors
FactoryDescription
AppColorPalette.defaultPalette()Gold/warm brand (home/event hub)
AppColorPalette.noTheme()Grayscale baseline
AppColorPalette.eventDefault()Event context (same as default)
PaletteController ($palette)

A ChangeNotifier that manages palette switching:

dart
$palette.setPalette(AppColorPalette palette) // Set custom palette
$palette.setDefaultPalette() // Gold/warm brand
$palette.setNoThemePalette() // Grayscale
$palette.setEventPalette() // Event default
$palette.currentPalette // Get current palette
Palette → AppColors Integration

Palette tokens are directly accessible via context.colors:

dart
context.colors.primaryA1 // e.g., #FFE5C07B
context.colors.supportA2 // e.g., #FF5E4A26
context.colors.complementB1 // e.g., #FF8A7BFF
context.colors.supportB2 // e.g., #FF2B2452

Derived gradients:

dart
context.colors.graphSpectrumGradient // [supportA2, primaryA1, complementB1, supportB2]
context.colors.rsvpHandleGradient // [primaryA1, supportA2]
Theme-Scoped Palette Changes

Use EventThemeBuilder widget to apply a palette to a widget subtree. updateAppStyle() in service_locator.dart accepts an optional palette parameter to rebuild AppStyle with new colors.


Typography (context.textStyles)

Display text uses EB Garamond; body/UI text uses Lato. All styles scale responsively.

TokenSizeWeightFontUse Case
displayLarge45pxRegular (400)EB GaramondHero text
h132pxMedium (500)EB GaramondPage titles
h224pxMedium (500)LatoSection headers
body116pxMedium (500)LatoPrimary body text
body1Light16pxLight (300)LatoSecondary body text
body214pxMedium (500)LatoSmall body text
caption12pxMedium (500)LatoCaptions, labels
captionLight12pxRegular (400)LatoLight captions
btn14pxMedium (500)LatoButton text

Apply color with copyWith:

dart
Text('Error', style: context.textStyles.body1.copyWith(color: context.colors.critical))

Spacing (context.styles.insets)

Values scale responsively based on device size.

TokenBase ValueDescription
xxs4pxMicro spacing
xs8pxTight spacing
sm12pxCompact spacing
md16pxStandard spacing
lg24pxComfortable spacing
xl32pxSection spacing
xxl40pxLarge section spacing
offset80pxSpecial offset layouts

Corners (context.styles.corners)

TokenValueUse Case
sm4pxSubtle rounding
md8pxStandard cards
lg16pxProminent elements
xl24pxModals, sheets
full999pxPills, circular elements

Shadows (context.styles.shadows)

TokenTypeDescription
textSoftList<Shadow>Subtle text depth
textList<Shadow>Standard text shadow
textStrongList<Shadow>High contrast text
cardSoftList<BoxShadow>Subtle card elevation
cardList<BoxShadow>Standard card elevation
cardStrongList<BoxShadow>High elevation (modals)
insetHighlightList<BoxShadow>Inner highlight effect

Animation Timings (context.styles.times)

TokenDurationUse Case
fast300msMicro-interactions
med600msStandard transitions
slow900msEmphasis
extraSlow1300msDramatic effect
pageTransition200msPage transitions

Sizes (context.styles.sizes)

TokenValueDescription
maxContentWidth1800pxLarge containers
maxContentWidth2600pxMedium containers
maxContentWidth3500pxSmall containers
minAppSize380×650Minimum app constraint

Dark/Light Mode

dart
$theme.toggleTheme() // Toggle
$theme.setThemeMode(ThemeMode.dark) // Force dark
$theme.setThemeMode(ThemeMode.light) // Force light
$theme.isDarkMode // Check

How it works: ThemeController (ChangeNotifier in GetIt) → AppScaffold watches it → AppStyle recreated with isDark flag → all tokens auto-switch.


Customization

Adding colors

Edit lib/design_system/styles/colours.dart:

dart
Color get brandTertiary => isDark ? const Color(0xFF...) : const Color(0xFF...);
Adding text styles

Edit AppText in styles.dart:

dart
late final TextStyle myCustomStyle = _createFont(font, sizePx: 18, heightPx: 24, spacingPc: 2, weight: FontWeight.w600);
Adding spacing

Edit AppInsets in styles.dart:

dart
late final double custom = 40 * _scale;

Rules

  • Access styles ONLY via context.styles, context.colors, context.textStyles — never use $styles (deprecated) or hardcode colors
  • Extend styles with copyWith — don't create TextStyle() from scratch (loses font family and scaling)
  • Use the spacing scale consistently — don't use arbitrary pixel values
  • Use semantic token names — context.colors.critical not Color(0xFFE01F1B)
  • Use palette tokens for brand/accent colors — context.colors.primaryA1 not hardcoded hex

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
66
Repository forks
7
7-day trend score
21

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/gskinnerteam/flutter-hatcha-app/theming/badge)](https://verified-skill.com/skills/gskinnerteam/flutter-hatcha-app/theming)

Something wrong with this skill or its page? Tell us.