openwebf-host-theming-sync

Sync theming between Flutter and WebF (automatic theme sync, prefers-color-scheme, dark mode patterns). Use when the user mentions theme sync, dark mode, prefers-color-scheme, CSS variables, or WebF theming from MaterialApp.

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 20, 2025

When & Why to Use This Skill

This Claude skill automates the synchronization of visual themes between Flutter and WebF. It ensures consistent UI styling by bridging Flutter's MaterialApp themes with WebF's CSS variables, supporting dark mode patterns, 'prefers-color-scheme' detection, and real-time theme propagation for hybrid applications.

Use Cases

  • Case 1: Automatically syncing Flutter's light and dark mode states to WebF-based web content using CSS variables.
  • Case 2: Implementing 'prefers-color-scheme' support in WebF to match the host Flutter application's brightness settings.
  • Case 3: Using the 'host/theme-sync-materialapp' template to quickly set up theme propagation from a Flutter host to a web view.
  • Case 4: Creating JavaScript MatchMedia listeners within WebF to respond dynamically to Flutter-driven theme changes.
nameopenwebf-host-theming-sync
descriptionSync theming between Flutter and WebF (automatic theme sync, prefers-color-scheme, dark mode patterns). Use when the user mentions theme sync, dark mode, prefers-color-scheme, CSS variables, or WebF theming from MaterialApp.
allowed-toolsRead, Grep, Glob, Bash, Edit, Write, mcp__openwebf__docs_search, mcp__openwebf__docs_get_section, mcp__openwebf__templates_get, mcp__openwebf__templates_render

OpenWebF Host: Theming Sync

Instructions

  1. Determine desired behavior: automatic sync vs manual overrides.
  2. Use MCP docs to confirm how theme synchronization works by default and safe patterns.
  3. Provide concrete patterns for:
    • CSS prefers-color-scheme
    • JS/React theme toggles
    • Flutter-driven theme propagation
  4. Offer templates where applicable:
    • host/theme-sync-materialapp
    • app/theming-prefers-color-scheme-css
    • app/theming-matchmedia-listener

More: