stitch_to_flutter
Installation
SKILL.md
Stitch to Flutter Skill
This skill documents how to translate UI designs generated by Google Stitch (which come as HTML and Tailwind CSS) into Flutter widgets, ensuring alignment with your Flutter project architecture and design system.
Core Conversion Principles
-
Structure Mapping:
<div>withflex->Column,Row, orFlex.<div>withmax-w-md mx-auto->Center+ConstrainedBoxorContainerwithmaxWidth.padding(p-4,px-6) ->Paddingwidget orpaddingproperty inContainer/ListView.space-y-4->ListViewwithgap(if available) orColumnwithSizedBoxbetween items.
-
Style Mapping:
- Colors: Use
Theme.of(context).colorSchemefor dynamic colors. Map Tailwind custom colors (e.g.,primary: "#F97316") to the project's brand colors inlib/core/theme/. - Typography: Map Tailwind font weights (
font-bold) and sizes (text-3xl) toTextThemescale tokens.- CRITICAL: Never used hardcoded
fontSize. Always useTheme.of(context).textTheme.
- CRITICAL: Never used hardcoded
- Colors: Use