flutter-widget-design
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-06-13
- Stars
- ★ 3
- Forks
- 1
03 SKILL.md 正文
Flutter Widget Design Skill
Generate screen specifications and design metadata for Flutter mobile widget creation. Every screen is designed as a native mobile experience — Scaffold-based, gesture-aware, optimized for one-handed use.
Purpose
This skill bridges the design system and HTML references with the actual Flutter widget implementation. It creates detailed specifications that guide the stitch-flutter conversion skill.
Phases
Phase 1: Plan (SPEC.md + META.md)
Read the design system, UX spec, and screen definitions. Produce:
SPEC.md — Detailed mobile screen specification:
- Screen Title and widget class name (e.g.,
HomeFeedScreen) - Purpose — User intent and key actions
- Route — GoRouter path (e.g.,
/,/novel/:id) - Scaffold Config:
- AppBar: title, leading widget, action buttons, collapsing behavior
- BottomNavigationBar: visible? which tab active?
- FloatingActionButton: icon, position, action
- Body Layout — Scroll type and structure:
SingleChildScrollView+Columnfor simple screensCustomScrollView+SliverAppBar+SliverListfor collapsing headersListView.builderfor long dynamic listsPageViewfor swipeable pagesNestedScrollView+TabBarViewfor tabbed content
- Sections — Each visual block:
- Widget type (
ListView,GridView,Column,SliverList,Wrap) - Child widgets and their props
- Data binding points (provider → widget)
- Interactive elements (tap, swipe, long-press)
- Widget type (
- Data — Entities and fields displayed, which Riverpod providers supply them
- States — Loading (shimmer), empty (illustration + CTA), error (retry), populated
- Gestures & Motion:
- Pull-to-refresh
- Swipe-to-dismiss (Dismissible)
- Hero tag assignments for shared-element transitions
- Entry animations (staggered fade-in, slide-up)
- Scroll-driven effects (SliverAppBar parallax, opacity changes)
- Accessibility — Semantics labels, focus traversal order, excluded decorative elements
META.md — Example selection:
- Score each reference example (1-5) on 6 dimensions
- Pick the best match for this screen's mobile pattern
Phase 2: Generate (design.html)
Using the spec and matched example, generate an HTML design mockup following the stitch-generate skill.
Flutter Mobile Widget Vocabulary
Screen Patterns → Widget Trees
| Mobile Pattern | Flutter Widget Tree |
|---|---|
| Feed/list screen | Scaffold → CustomScrollView → SliverAppBar + SliverList |
| Detail screen | Scaffold → CustomScrollView → SliverAppBar(expandedHeight) + SliverToBoxAdapter |
| Tabbed screen | Scaffold → DefaultTabController → NestedScrollView → TabBar + TabBarView |
| Form screen | Scaffold → SingleChildScrollView → Column → TextFormFields |
| Settings screen | Scaffold → ListView → ListTile/SwitchListTile/ExpansionTile |
| Grid browser | Scaffold → CustomScrollView → SliverAppBar + SliverGrid |
Content Elements → Widgets
| Content | Flutter Widget |
|---|---|
| Tappable card | InkWell → Card → Padding → Row/Column |
| Image thumbnail | ClipRRect → CachedNetworkImage(fit: BoxFit.cover) |
| Section header | Padding → Row → Text + TextButton("See All") |
| Horizontal carousel | SizedBox(height) → ListView(scrollDirection: Axis.horizontal) |
| Filter chips | SingleChildScrollView(horizontal) → Wrap/Row → FilterChips |
| Progress bar | ClipRRect → LinearProgressIndicator |
| Rating stars | Row → Icon(Icons.star) + Text |
| Avatar | CircleAvatar(backgroundImage: CachedNetworkImageProvider(...)) |
| Empty state | Center → Column → Icon + Text + ElevatedButton |
| Sticky bottom bar | Scaffold.bottomNavigationBar or Scaffold.persistentFooterButtons |
Navigation → GoRouter
| Action | Flutter Code |
|---|---|
| Push to detail | context.push('/novel/\${novel.id}') |
| Switch tab | context.go('/browse') (via ShellRoute) |
| Pop back | context.pop() |
| Present bottom sheet | showModalBottomSheet(context: context, ...) |
| Show dialog | showDialog(context: context, ...) |
04 同仓库更多 Skills
hello-checker
Use this skill when asked to "verify", "check", or "validate" a file's existence and content. It provides a reliable workflow for confirming files meet their spec.
ask-skill
暂无简介
html-review-artifact
Framework-wide guidance for crafting polished human-review artifacts as markdown or HTML
converge-planning
Design a Converge playbook end-to-end. Use when the user says "plan a project", "design a playbook", "decompose into tasks", "scaffold a Converge workflow", "onboard to Converge", or asks how to write TASK.md / playbook.yml. Two entry points: plan a new playbook or update an existing one. Hand off to `/converge-control` after producing the playbook structure.
converge-control
Operate a Converge playbook end-to-end — start runs, monitor progress, narrow failures with `--select`, inspect runtime state, validate definitions, surgically reset subtrees, and stop stuck or orphaned runs. Use this skill whenever the user says "run my playbook", "execute this", "monitor the run", "converge failed", "the run is stuck", "retry failures", "babysit this playbook", "what's the status?", "show me the gantt", or asks how to use `converge run` / `--select` / `inspect` / `doctor` / `clean` / `stop`. Also use it for `HTTP 401` / `Invalid API key` failures on the first task — those are environment-not-playbook problems — and for any post-run cleanup work. Hand off to `converge-planning` if the user wants to design or restructure the playbook itself.
repair-taskts
Fix task.ts definition issues — Seed syntax, missing .build(), empty checks, import errors, TypeScript errors