[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BV9J9XC3R71RQEDA6ZCAAA":3,"skill-same:01M7BV9J9XC3R71RQEDA6ZCAAA":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":33,"install":34,"resources":47},"01M7BV9J9XC3R71RQEDA6ZCAAA","flutter-add-widget-preview",null,"Adds interactive widget previews to the project using the previews.dart system. Use when creating new UI components or updating existing screens to ensure consistent design and interactive testing.","nguyenhungtran18\u002Fskill-and-tool-tracker","nguyenhungtran18","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F297063550?v=4","01M7BV0BFPRRFP84F2ME0FYZ9D","01M7BV0BG83FA5P22NJV0GR0A5",1,"MIT","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fflutter-add-widget-preview\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: flutter-add-widget-preview\ndescription: Adds interactive widget previews to the project using the previews.dart system. Use when creating new UI components or updating existing screens to ensure consistent design and interactive testing.\nmetadata:\n  model: models\u002Fgemini-3.1-pro-preview\n  last_modified: Tue, 21 Apr 2026 20:05:23 GMT\n---\n# Previewing Flutter Widgets\n\n## Contents\n- [Preview Guidelines](#preview-guidelines)\n- [Handling Limitations](#handling-limitations)\n- [Workflows](#workflows)\n- [Examples](#examples)\n\n## Preview Guidelines\n\nUse the Flutter Widget Previewer to render widgets in real-time, isolated from the full application context. \n\n- **Target Elements:** Apply the `@Preview` annotation to top-level functions, static methods within a class, or public widget constructors\u002Ffactories that have no required arguments and return a `Widget` or `WidgetBuilder`.\n- **Imports:** Always import `package:flutter\u002Fwidget_previews.dart` to access the preview annotations.\n- **Custom Annotations:** Extend the `Preview` class to create custom annotations that inject common properties (e.g., themes, wrappers) across multiple widgets.\n- **Multiple Configurations:** Apply multiple `@Preview` annotations to a single target to generate multiple preview instances. Alternatively, extend `MultiPreview` to encapsulate common multi-preview configurations.\n- **Runtime Transformations:** Override the `transform()` method in custom `Preview` or `MultiPreview` classes to modify preview configurations dynamically at runtime (e.g., generating names based on dynamic values, which is impossible in a `const` context).\n\n## Handling Limitations\n\nAdhere to the following constraints when authoring previewable widgets, as the Widget Previewer runs in a web environment:\n\n- **No Native APIs:** Do not use native plugins or APIs from `dart:io` or `dart:ffi`. Widgets with transitive dependencies on `dart:io` or `dart:ffi` will throw exceptions upon invocation. Use conditional imports to mock or bypass these in preview mode.\n- **Asset Paths:** Use package-based paths for assets loaded via `dart:ui` `fromAsset` APIs (e.g., `packages\u002Fmy_package_name\u002Fassets\u002Fmy_image.png` instead of `assets\u002Fmy_image.png`).\n- **Public Callbacks:** Ensure all callback arguments provided to preview annotations are public and constant to satisfy code generation requirements.\n- **Constraints:** Apply explicit constraints using the `size` parameter in the `@Preview` annotation if your widget is unconstrained, as the previewer defaults to constraining them to approximately half the viewport.\n\n## Workflows\n\n### Creating a Widget Preview\nCopy and track this checklist when implementing a new widget preview:\n\n- [ ] Import `package:flutter\u002Fwidget_previews.dart`.\n- [ ] Identify a valid target (top-level function, static method, or parameter-less public constructor).\n- [ ] Apply the `@Preview` annotation to the target.\n- [ ] Configure preview parameters (`name`, `group`, `size`, `theme`, `brightness`, etc.) as needed.\n- [ ] If applying the same configuration to multiple widgets, extract the configuration into a custom class extending `Preview`.\n\n### Interacting with Previews\nFollow the appropriate conditional workflow to launch and interact with the Widget Previewer:\n\n**If using a supported IDE (Android Studio, IntelliJ, VS Code with Flutter 3.38+):**\n1. Launch the IDE. The Widget Previewer starts automatically.\n2. Open the \"Flutter Widget Preview\" tab in the sidebar.\n3. Toggle \"Filter previews by selected file\" at the bottom left if you want to view previews outside the currently active file.\n\n**If using the Command Line:**\n1. Navigate to the Flutter project's root directory.\n2. Run `flutter widget-preview start`.\n3. View the automatically opened Chrome environment.\n\n**Feedback Loop: Preview Iteration**\n1. Modify the widget code or preview configuration.\n2. Observe the automatic update in the Widget Previewer.\n3. If global state (e.g., static initializers) was modified: Click the global hot restart button at the bottom right.\n4. If only the local widget state needs resetting: Click the individual hot restart button on the specific preview card.\n5. Review errors in the IDE\u002FCLI console -> fix -> repeat.\n\n## Examples\n\n### Basic Preview\n```dart\nimport 'package:flutter\u002Fwidget_previews.dart';\nimport 'package:flutter\u002Fmaterial.dart';\n\n@Preview(name: 'My Sample Text', group: 'Typography')\nWidget mySampleText() {\n  return const Text('Hello, World!');\n}\n```\n\n### Custom Preview with Runtime Transformation\n```dart\nimport 'package:flutter\u002Fwidget_previews.dart';\nimport 'package:flutter\u002Fmaterial.dart';\n\nfinal class TransformativePreview extends Preview {\n  const TransformativePreview({\n    super.name,\n    super.group,\n  });\n\n  PreviewThemeData _themeBuilder() {\n    return PreviewThemeData(\n      materialLight: ThemeData.light(),\n      materialDark: ThemeData.dark(),\n    );\n  }\n\n  @override\n  Preview transform() {\n    final originalPreview = super.transform();\n    final builder = originalPreview.toBuilder();\n    \n    builder\n      ..name = 'Transformed - ${originalPreview.name}'\n      ..theme = _themeBuilder;\n\n    return builder.toPreview();\n  }\n}\n\n@TransformativePreview(name: 'Custom Themed Button')\nWidget myButton() => const ElevatedButton(onPressed: null, child: Text('Click'));\n```\n\n### MultiPreview Implementation\n```dart\nimport 'package:flutter\u002Fwidget_previews.dart';\nimport 'package:flutter\u002Fmaterial.dart';\n\n\u002F\u002F\u002F Creates light and dark mode previews automatically.\nfinal class MultiBrightnessPreview extends MultiPreview {\n  const MultiBrightnessPreview({required this.name});\n\n  final String name;\n\n  @override\n  List\u003CPreview> get previews => const [\n        Preview(brightness: Brightness.light),\n        Preview(brightness: Brightness.dark),\n      ];\n\n  @override\n  List\u003CPreview> transform() {\n    final previews = super.transform();\n    return previews.map((preview) {\n      final builder = preview.toBuilder()\n        ..group = 'Brightness'\n        ..name = '$name - ${preview.brightness!.name}';\n      return builder.toPreview();\n    }).toList();\n  }\n}\n\n@MultiBrightnessPreview(name: 'Primary Card')\nWidget cardPreview() => const Card(child: Padding(padding: EdgeInsets.all(8.0), child: Text('Content')));\n```\n","# Previewing Flutter Widgets\n\n## Contents\n- [Preview Guidelines](#preview-guidelines)\n- [Handling Limitations](#handling-limitations)\n- [Workflows](#workflows)\n- [Examples](#examples)\n\n## Preview Guidelines\n\nUse the Flutter Widget Previewer to render widgets in real-time, isolated from the full application context. \n\n- **Target Elements:** Apply the `@Preview` annotation to top-level functions, static methods within a class, or public widget constructors\u002Ffactories that have no required arguments and return a `Widget` or `WidgetBuilder`.\n- **Imports:** Always import `package:flutter\u002Fwidget_previews.dart` to access the preview annotations.\n- **Custom Annotations:** Extend the `Preview` class to create custom annotations that inject common properties (e.g., themes, wrappers) across multiple widgets.\n- **Multiple Configurations:** Apply multiple `@Preview` annotations to a single target to generate multiple preview instances. Alternatively, extend `MultiPreview` to encapsulate common multi-preview configurations.\n- **Runtime Transformations:** Override the `transform()` method in custom `Preview` or `MultiPreview` classes to modify preview configurations dynamically at runtime (e.g., generating names based on dynamic values, which is impossible in a `const` context).\n\n## Handling Limitations\n\nAdhere to the following constraints when authoring previewable widgets, as the Widget Previewer runs in a web environment:\n\n- **No Native APIs:** Do not use native plugins or APIs from `dart:io` or `dart:ffi`. Widgets with transitive dependencies on `dart:io` or `dart:ffi` will throw exceptions upon invocation. Use conditional imports to mock or bypass these in preview mode.\n- **Asset Paths:** Use package-based paths for assets loaded via `dart:ui` `fromAsset` APIs (e.g., `packages\u002Fmy_package_name\u002Fassets\u002Fmy_image.png` instead of `assets\u002Fmy_image.png`).\n- **Public Callbacks:** Ensure all callback arguments provided to preview annotations are public and constant to satisfy code generation requirements.\n- **Constraints:** Apply explicit constraints using the `size` parameter in the `@Preview` annotation if your widget is unconstrained, as the previewer defaults to constraining them to approximately half the viewport.\n\n## Workflows\n\n### Creating a Widget Preview\nCopy and track this checklist when implementing a new widget preview:\n\n- [ ] Import `package:flutter\u002Fwidget_previews.dart`.\n- [ ] Identify a valid target (top-level function, static method, or parameter-less public constructor).\n- [ ] Apply the `@Preview` annotation to the target.\n- [ ] Configure preview parameters (`name`, `group`, `size`, `theme`, `brightness`, etc.) as needed.\n- [ ] If applying the same configuration to multiple widgets, extract the configuration into a custom class extending `Preview`.\n\n### Interacting with Previews\nFollow the appropriate conditional workflow to launch and interact with the Widget Previewer:\n\n**If using a supported IDE (Android Studio, IntelliJ, VS Code with Flutter 3.38+):**\n1. Launch the IDE. The Widget Previewer starts automatically.\n2. Open the \"Flutter Widget Preview\" tab in the sidebar.\n3. Toggle \"Filter previews by selected file\" at the bottom left if you want to view previews outside the currently active file.\n\n**If using the Command Line:**\n1. Navigate to the Flutter project's root directory.\n2. Run `flutter widget-preview start`.\n3. View the automatically opened Chrome environment.\n\n**Feedback Loop: Preview Iteration**\n1. Modify the widget code or preview configuration.\n2. Observe the automatic update in the Widget Previewer.\n3. If global state (e.g., static initializers) was modified: Click the global hot restart button at the bottom right.\n4. If only the local widget state needs resetting: Click the individual hot restart button on the specific preview card.\n5. Review errors in the IDE\u002FCLI console -> fix -> repeat.\n\n## Examples\n\n### Basic Preview\n```dart\nimport 'package:flutter\u002Fwidget_previews.dart';\nimport 'package:flutter\u002Fmaterial.dart';\n\n@Preview(name: 'My Sample Text', group: 'Typography')\nWidget mySampleText() {\n  return const Text('Hello, World!');\n}\n```\n\n### Custom Preview with Runtime Transformation\n```dart\nimport 'package:flutter\u002Fwidget_previews.dart';\nimport 'package:flutter\u002Fmaterial.dart';\n\nfinal class TransformativePreview extends Preview {\n  const TransformativePreview({\n    super.name,\n    super.group,\n  });\n\n  PreviewThemeData _themeBuilder() {\n    return PreviewThemeData(\n      materialLight: ThemeData.light(),\n      materialDark: ThemeData.dark(),\n    );\n  }\n\n  @override\n  Preview transform() {\n    final originalPreview = super.transform();\n    final builder = originalPreview.toBuilder();\n    \n    builder\n      ..name = 'Transformed - ${originalPreview.name}'\n      ..theme = _themeBuilder;\n\n    return builder.toPreview();\n  }\n}\n\n@TransformativePreview(name: 'Custom Themed Button')\nWidget myButton() => const ElevatedButton(onPressed: null, child: Text('Click'));\n```\n\n### MultiPreview Implementation\n```dart\nimport 'package:flutter\u002Fwidget_previews.dart';\nimport 'package:flutter\u002Fmaterial.dart';\n\n\u002F\u002F\u002F Creates light and dark mode previews automatically.\nfinal class MultiBrightnessPreview extends MultiPreview {\n  const MultiBrightnessPreview({required this.name});\n\n  final String name;\n\n  @override\n  List\u003CPreview> get previews => const [\n        Preview(brightness: Brightness.light),\n        Preview(brightness: Brightness.dark),\n      ];\n\n  @override\n  List\u003CPreview> transform() {\n    final previews = super.transform();\n    return previews.map((preview) {\n      final builder = preview.toBuilder()\n        ..group = 'Brightness'\n        ..name = '$name - ${preview.brightness!.name}';\n      return builder.toPreview();\n    }).toList();\n  }\n}\n\n@MultiBrightnessPreview(name: 'Primary Card')\nWidget cardPreview() => const Card(child: Padding(padding: EdgeInsets.all(8.0), child: Text('Content')));\n```\n",{"name":5,"metadata":23,"description":7},{"model":24,"last_modified":25},"models\u002Fgemini-3.1-pro-preview","Tue, 21 Apr 2026 20:05:23 GMT","main","900ea3c9eb045fd5b0317dc1103777ecf3ea4aeb","skills\u002Fflutter-add-widget-preview",0,"https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker","https:\u002F\u002Fnguyenhungtran18.github.io\u002Fskill-and-tool-tracker\u002F","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18","2026-08-31 18:36:09",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add nguyenhungtran18\u002Fskill-and-tool-tracker --skill flutter-add-widget-preview",{"tool":40,"command":41},"bunx","bunx skills add nguyenhungtran18\u002Fskill-and-tool-tracker --skill flutter-add-widget-preview",{"tool":43,"command":44},"pnpm","pnpm dlx skills add nguyenhungtran18\u002Fskill-and-tool-tracker --skill flutter-add-widget-preview","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fflutter-add-widget-preview\u002FSKILL.md",true,[],[49,56,63,70,77,84],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":18},"01M7BVP4P83TK60JZ4P8RP9VP7","xcode-project-setup","Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fxcode_project_setup\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":18},"01M7BVP01K4CSJJ8G90FT8S2D5","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-skills\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M7BVNY22GXD871GYTSH599F1","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":18},"01M7BVNQWF24RNKA8A4KM2HJ3T","workflow-skill-creator","Distills a completed user workflow or interaction into a reusable agent skill. Use when the user asks to turn their workflow, interaction, or multi-step process into a skill, or when they say \"make this a skill\", \"create a skill from what we just did\", \"package this workflow\" or similar. Do not use for creating skills from scratch without an existing workflow (use a generic skill-creator for that).","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow_skill_creator\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":18},"01M7BVNNY67XPCQAQHY3FBKDGC","verify-and-stop","Prove existing work meets acceptance conditions without expanding scope. Use for validation-only tasks, completion checks, focused gate runs, and last-mile proof.","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fverify-and-stop\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":18},"01M7BVNKB4Z7SZT85B73ZZ90Y6","verification-before-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[],[]]