[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CS7M7W4FJPCQF587JPHJWK":3,"skill-same:01M7CS7M7W4FJPCQF587JPHJWK":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M7CS7M7W4FJPCQF587JPHJWK","flutter-widget-architecture",null,"Use when building Flutter screens - compose small stateless widgets, keep layout declarative, decide layout by available width not device\u002Forientation, separate presentation from business logic, and use the theme not hardcoded styles","makifbaysal\u002Ftasktrooper","makifbaysal","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F25031940?v=4","01M7CRG3ZCSYZSSEVDMW3DEYC8","Mehmet Akif Baysal","01M7CRG401FJ8YAXH5ER730XYV",122,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fmobile-developer\u002Fskills\u002Fflutter-widget-architecture\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: flutter-widget-architecture\ncategory: architecture\ndescription: Use when building Flutter screens - compose small stateless widgets, keep layout declarative, decide layout by available width not device\u002Forientation, separate presentation from business logic, and use the theme not hardcoded styles\ntech_stack: Flutter\nsource: flutter\u002Fagent-plugins (BSD-3-Clause), adapted\n---\n# Flutter Widget Architecture\n\n## Overview\n\nFlutter UI is a tree of widgets. The quality difference is in decomposition: small, focused, mostly-stateless widgets that read like the UI they render, with business logic pushed out of the widget tree.\n\n**Core principle:** Widgets describe what the UI looks like given state. They do not fetch data, hold business rules, or talk to the network — that lives in state\u002Fservices (see flutter-state-management).\n\n## Rules\n\n- **Prefer `StatelessWidget`.** Reach for `StatefulWidget` only for truly local, ephemeral UI state (an animation controller, a text field's focus). App\u002Fbusiness state lives in your state management layer.\n- **Small widgets over deep `build` methods.** A `build` longer than ~40 lines or nested 5+ deep is a set of extract-widget opportunities. Extract named widgets, not `Widget _buildX()` helper methods (named widgets get their own rebuild scope and are testable).\n- **`const` constructors everywhere possible** — a `const` widget subtree is skipped on rebuild. This is the cheapest performance win in Flutter.\n- **Theme, not hardcoded styles.** Colors, text styles, spacing come from `Theme.of(context)` \u002F a design-token file (`context.space`, see `mobile-design-system-foundation`) — never scattered `Color(0xFF...)` and magic paddings. This is the Flutter equivalent of \"no custom CSS.\"\n- **Keys** only when you need identity across rebuilds (reorderable lists) — don't sprinkle them.\n- **Decide layout by available width, not device type or orientation.** Use `LayoutBuilder` or `MediaQuery.sizeOf(context)` — never `MediaQuery.of(context).size` (that rebuilds on every metric change, not just size) and never a device-type\u002Forientation check to pick a layout. See `adaptive-layout` and `mobile-visual-self-review` for the size matrix this must hold at.\n- **`Color.withValues(alpha:)`**, not the deprecated `withOpacity` (precision loss). **`TextScaler`** (`MediaQuery.textScalerOf(context).scale(...)`), not the deprecated `textScaleFactor`.\n\n## Worked Example\n\n```dart\n\u002F\u002F ❌ one giant build, hardcoded style, logic in the widget\nWidget build(BuildContext context) {\n  return Container(padding: EdgeInsets.all(16), color: Color(0xFF2196F3),\n    child: Column(children: [ Text(task.title, style: TextStyle(fontSize: 18)), \u002F* 60 more lines *\u002F ]));\n}\n\n\u002F\u002F ✅ composed from small const widgets, themed, logic elsewhere\nclass TaskCard extends StatelessWidget {\n  const TaskCard({super.key, required this.task});\n  final Task task;\n  @override\n  Widget build(BuildContext context) => Card(\n    child: Padding(\n      padding: EdgeInsets.all(context.space.md),   \u002F\u002F token, not a magic 16\n      child: Column(children: [\n        TaskTitle(title: task.title),        \u002F\u002F extracted, testable atom\n        TaskStatusChip(status: task.status), \u002F\u002F extracted molecule\n      ]),\n    ),\n  );\n}\n```\n\n## Layout-error catalogue\n\nFour errors that show up repeatedly and what they mean:\n\n- **\"Vertical viewport was given unbounded height\"** — a `Column`\u002F`ListView` inside another unbounded-height ancestor (e.g. a `Column` inside a `SingleChildScrollView` with no `Expanded`\u002F`shrinkWrap`). Give it a bound: `Expanded`, `SizedBox`, or `shrinkWrap: true` when genuinely short.\n- **\"`InputDecorator` ... unbounded width\"** — a `TextField`\u002F`TextFormField` inside a `Row` with no `Expanded`\u002F`Flexible` wrapping it.\n- **\"`RenderFlex` overflowed by N pixels\"** — the matrix-test failure mode (see `mobile-visual-self-review`); fix by deciding layout from available width, not by shrinking content to fit.\n- **\"Incorrect use of `ParentData` widget\"** — a widget meant for one parent (`Expanded`, `Positioned`) used under the wrong parent type (not `Flex`\u002F`Stack`). The fix is almost always removing a stray wrapper, not adding one.\n- Ignore a cascading **\"RenderBox was not laid out\"** once you've fixed the error above it — it's usually fallout from the first failure, not a separate bug.\n\n## Version note (Flutter 3.47+)\n\n`material_ui`\u002F`cupertino_ui` are now separate packages from the bundled Material\u002FCupertino libraries; don't run `dart fix --apply --code=migrate_design_widgets` or otherwise migrate a repo to them unless the task explicitly asks — follow what the repo already uses.\n\n## Common Mistakes\n\n- `StatefulWidget` holding data that came from an API — that's app state, lift it out.\n- `Widget _buildHeader()` helper methods instead of real widget classes.\n- Hardcoded colors\u002Fsizes instead of the theme.\n- Missing `const` on static subtrees → needless rebuilds.\n- Choosing layout by `MediaQuery.of(context).size` or an orientation\u002Fdevice check instead of `LayoutBuilder`\u002F`MediaQuery.sizeOf`.\n- `textScaleFactor`\u002F`withOpacity` instead of `TextScaler`\u002F`Color.withValues`.\n\n## Red Flags\n\n- A `build` method you scroll to read.\n- `setState` mutating something a service should own.\n- `Color(0xFF...)` \u002F magic paddings outside the theme file.\n- A layout branch keyed on `Theme.of(context).platform` or `MediaQuery.orientationOf` instead of width.\n","# Flutter Widget Architecture\n\n## Overview\n\nFlutter UI is a tree of widgets. The quality difference is in decomposition: small, focused, mostly-stateless widgets that read like the UI they render, with business logic pushed out of the widget tree.\n\n**Core principle:** Widgets describe what the UI looks like given state. They do not fetch data, hold business rules, or talk to the network — that lives in state\u002Fservices (see flutter-state-management).\n\n## Rules\n\n- **Prefer `StatelessWidget`.** Reach for `StatefulWidget` only for truly local, ephemeral UI state (an animation controller, a text field's focus). App\u002Fbusiness state lives in your state management layer.\n- **Small widgets over deep `build` methods.** A `build` longer than ~40 lines or nested 5+ deep is a set of extract-widget opportunities. Extract named widgets, not `Widget _buildX()` helper methods (named widgets get their own rebuild scope and are testable).\n- **`const` constructors everywhere possible** — a `const` widget subtree is skipped on rebuild. This is the cheapest performance win in Flutter.\n- **Theme, not hardcoded styles.** Colors, text styles, spacing come from `Theme.of(context)` \u002F a design-token file (`context.space`, see `mobile-design-system-foundation`) — never scattered `Color(0xFF...)` and magic paddings. This is the Flutter equivalent of \"no custom CSS.\"\n- **Keys** only when you need identity across rebuilds (reorderable lists) — don't sprinkle them.\n- **Decide layout by available width, not device type or orientation.** Use `LayoutBuilder` or `MediaQuery.sizeOf(context)` — never `MediaQuery.of(context).size` (that rebuilds on every metric change, not just size) and never a device-type\u002Forientation check to pick a layout. See `adaptive-layout` and `mobile-visual-self-review` for the size matrix this must hold at.\n- **`Color.withValues(alpha:)`**, not the deprecated `withOpacity` (precision loss). **`TextScaler`** (`MediaQuery.textScalerOf(context).scale(...)`), not the deprecated `textScaleFactor`.\n\n## Worked Example\n\n```dart\n\u002F\u002F ❌ one giant build, hardcoded style, logic in the widget\nWidget build(BuildContext context) {\n  return Container(padding: EdgeInsets.all(16), color: Color(0xFF2196F3),\n    child: Column(children: [ Text(task.title, style: TextStyle(fontSize: 18)), \u002F* 60 more lines *\u002F ]));\n}\n\n\u002F\u002F ✅ composed from small const widgets, themed, logic elsewhere\nclass TaskCard extends StatelessWidget {\n  const TaskCard({super.key, required this.task});\n  final Task task;\n  @override\n  Widget build(BuildContext context) => Card(\n    child: Padding(\n      padding: EdgeInsets.all(context.space.md),   \u002F\u002F token, not a magic 16\n      child: Column(children: [\n        TaskTitle(title: task.title),        \u002F\u002F extracted, testable atom\n        TaskStatusChip(status: task.status), \u002F\u002F extracted molecule\n      ]),\n    ),\n  );\n}\n```\n\n## Layout-error catalogue\n\nFour errors that show up repeatedly and what they mean:\n\n- **\"Vertical viewport was given unbounded height\"** — a `Column`\u002F`ListView` inside another unbounded-height ancestor (e.g. a `Column` inside a `SingleChildScrollView` with no `Expanded`\u002F`shrinkWrap`). Give it a bound: `Expanded`, `SizedBox`, or `shrinkWrap: true` when genuinely short.\n- **\"`InputDecorator` ... unbounded width\"** — a `TextField`\u002F`TextFormField` inside a `Row` with no `Expanded`\u002F`Flexible` wrapping it.\n- **\"`RenderFlex` overflowed by N pixels\"** — the matrix-test failure mode (see `mobile-visual-self-review`); fix by deciding layout from available width, not by shrinking content to fit.\n- **\"Incorrect use of `ParentData` widget\"** — a widget meant for one parent (`Expanded`, `Positioned`) used under the wrong parent type (not `Flex`\u002F`Stack`). The fix is almost always removing a stray wrapper, not adding one.\n- Ignore a cascading **\"RenderBox was not laid out\"** once you've fixed the error above it — it's usually fallout from the first failure, not a separate bug.\n\n## Version note (Flutter 3.47+)\n\n`material_ui`\u002F`cupertino_ui` are now separate packages from the bundled Material\u002FCupertino libraries; don't run `dart fix --apply --code=migrate_design_widgets` or otherwise migrate a repo to them unless the task explicitly asks — follow what the repo already uses.\n\n## Common Mistakes\n\n- `StatefulWidget` holding data that came from an API — that's app state, lift it out.\n- `Widget _buildHeader()` helper methods instead of real widget classes.\n- Hardcoded colors\u002Fsizes instead of the theme.\n- Missing `const` on static subtrees → needless rebuilds.\n- Choosing layout by `MediaQuery.of(context).size` or an orientation\u002Fdevice check instead of `LayoutBuilder`\u002F`MediaQuery.sizeOf`.\n- `textScaleFactor`\u002F`withOpacity` instead of `TextScaler`\u002F`Color.withValues`.\n\n## Red Flags\n\n- A `build` method you scroll to read.\n- `setState` mutating something a service should own.\n- `Color(0xFF...)` \u002F magic paddings outside the theme file.\n- A layout branch keyed on `Theme.of(context).platform` or `MediaQuery.orientationOf` instead of width.\n",{"name":5,"source":24,"category":25,"tech_stack":26,"description":7},"flutter\u002Fagent-plugins (BSD-3-Clause), adapted","architecture","Flutter","main","910394a0b6db9fc8c9a8f36328ec421d3ebd8b38","catalog\u002Fagents\u002Fmobile-developer\u002Fskills\u002Fflutter-widget-architecture",18,"https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper","https:\u002F\u002Ftasktrooper.ai","https:\u002F\u002Fgithub.com\u002Fmakifbaysal","Senior Software Developer","2026-11-15 04:50:29",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add makifbaysal\u002Ftasktrooper --skill flutter-widget-architecture",{"tool":42,"command":43},"bunx","bunx skills add makifbaysal\u002Ftasktrooper --skill flutter-widget-architecture",{"tool":45,"command":46},"pnpm","pnpm dlx skills add makifbaysal\u002Ftasktrooper --skill flutter-widget-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fmobile-developer\u002Fskills\u002Fflutter-widget-architecture\u002FSKILL.md",true,[],[51,57,64,71,78,85],{"skillNo":52,"name":53,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7CSVEPQW6J6TD6CS2T5FPNZ","visual-craft","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fvisual-craft\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7CSVAQG91ETHQ0HBNZDG5FR","ux-copy","Use when you write any words a user reads in a mockup or a hand-off - content language and voice, buttons, labels, errors, empty states, confirmations, numbers and dates, and the longest-string check","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fux-copy\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7CSV6H0J38659NDXHJQ8396","screen-mockup-html","Use when you draw screens as the design task's HTML mockup - ONE canvas document holding every screen and every variant side by side, the sanitizer-safe recipe, phone and wide frames, the states grid, static control states, and the loopback self-check with screenshots at 375, 768 and 1440 attached to the task","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fscreen-mockup-html\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7CSV3JFRF3BM3XK52M7YEYR","performance-awareness","How the performance score moves for your role. Use when the score context shows a declining trend, or before handing off work you have not self-checked against every criterion.","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fperformance-awareness\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7CSTZDH00YRF5SCT7BRT9QD","design-variants","Use when a screen design needs variants - how many, variants as side-by-side rows on the one canvas, what makes two variants genuinely different, recommending one, how the human's choice is read, and narrowing to the chosen one in revision","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fdesign-variants\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7CSTV6P3SM3PAE28DB0RF77","design-system-authoring","Use when you derive, change or extend a design system - where tokens live per stack, the DTCG token tree, role-based names for both themes, base vs layer vs drift, the DESIGN.md section order, the inventory format, the contrast check and the lint every proposal returns","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fdesign-system-authoring\u002FSKILL.md",[],[]]