[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CS7FN08RMBJJ9JF88PSZR8":3,"skill-same:01M7CS7FN08RMBJJ9JF88PSZR8":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},"01M7CS7FN08RMBJJ9JF88PSZR8","flutter-testing",null,"Use when testing Flutter code - unit tests for logic, widget tests for UI behavior, golden tests for appearance, the multi-size\u002Ftext-scale\u002Fdark matrix, accessibility guidelines, test-first","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-testing\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: flutter-testing\ncategory: testing\ndescription: Use when testing Flutter code - unit tests for logic, widget tests for UI behavior, golden tests for appearance, the multi-size\u002Ftext-scale\u002Fdark matrix, accessibility guidelines, test-first\ntech_stack: Flutter\nsource: flutter\u002Fagent-plugins (BSD-3-Clause), adapted\n---\n# Flutter Testing\n\n## Overview\n\nTest-first in Flutter (see tdd-workflow). Three layers, each for a different question: does the logic work, does the widget behave, does it look right.\n\n**Core principle:** Most tests are fast unit + widget tests. Golden tests guard appearance; integration tests guard whole flows — use them sparingly.\n\n## Test layers\n\n| Layer | Question | Tool |\n|-------|----------|------|\n| Unit | Does the controller\u002Flogic compute correctly? | `flutter_test`, mock the repository |\n| Widget | Does the widget render state and respond to taps? | `testWidgets` + `pumpWidget` + finders |\n| Golden | Does it match the approved pixels? | `matchesGoldenFile` |\n| Integration | Does the whole flow work on a device? | `integration_test` |\n\n## Widget test example\n\n```dart\ntestWidgets('shows error view and retries', (tester) async {\n  final controller = FakeTaskController()..emitError('boom');\n  await tester.pumpWidget(wrap(TaskListScreen(controller: controller)));\n  await tester.pump();\n\n  expect(find.text('boom'), findsOneWidget);\n  await tester.tap(find.byType(RetryButton));\n  await tester.pump();\n  expect(controller.loadCalled, isTrue);   \u002F\u002F intent reached the controller\n});\n```\n\n## Rules\n\n- **Unit-test controllers\u002Flogic without pumping a widget** — that's the payoff of keeping logic out of widgets (see flutter-state-management).\n- **Widget tests assert observable behavior** (text visible, tap triggers intent), not internal structure.\n- **Mock the repository\u002Fports**, not the widget under test. Prefer a hand-written fake or `mocktail` per the app's convention.\n- **Golden tests:** commit the golden, review changes deliberately; regenerate only when the change is intended.\n- Cover loading, data, empty, and error states — the branches most likely to ship broken.\n- `pump` vs `pumpAndSettle`: use `pump` for controlled frames, `pumpAndSettle` to drain animations — never rely on real timers.\n\n## Matrix test: size, text scale, dark mode\n\nA widget test that only runs at the default size and text scale misses the most common mobile layout bug — overflow at larger text scales. See `mobile-visual-self-review` for the full size matrix and the worked `PriceRow` example (verified: passes at text scale 1.0 everywhere, overflows by 82px at 360×640\u002F2.0). The shape:\n\n```dart\ntester.view.physicalSize = const Size(360, 640) * 3;\ntester.view.devicePixelRatio = 3;\ntester.platformDispatcher.textScaleFactorTestValue = 2.0;\naddTearDown(tester.view.reset);\naddTearDown(tester.platformDispatcher.clearAllTestValues);\n```\n\nRun this as a real `testWidgets` case per matrix cell for any screen\u002Fcomponent whose layout changed — it is the failing test a layout change starts from (see `tdd-first`), not an afterthought bolted on once the happy path passes.\n\n## Accessibility guidelines (verified)\n\n`meetsGuideline` from `flutter_test`\u002F`flutter\u002Faccessibility`, run inside `tester.ensureSemantics()`:\n\n```dart\nfinal handle = tester.ensureSemantics();\nawait expectLater(tester, meetsGuideline(androidTapTargetGuideline));   \u002F\u002F 48x48\nawait expectLater(tester, meetsGuideline(iOSTapTargetGuideline));       \u002F\u002F 44x44\nawait expectLater(tester, meetsGuideline(labeledTapTargetGuideline));   \u002F\u002F every tappable has a label\nawait expectLater(tester, meetsGuideline(textContrastGuideline));\nhandle.dispose();\n```\n\nRun these against every new or changed interactive widget's test, not just a dedicated accessibility suite.\n\n## Golden test pitfalls (verified)\n\n- **Fonts:** by default, text renders as box glyphs in a golden unless the app's real fonts are loaded in `flutter_test_config.dart` (`loadAppFonts()` or equivalent) — a golden taken without that setup locks in boxes, not the real typography. Use goldens for layout\u002Fshape verification, or load the fonts first.\n- **OS differences:** text rendering and anti-aliasing differ per OS, so the same golden can legitimately differ on macOS vs Linux CI. Tag golden tests (`@Tags(['golden'])`) and generate\u002Fupdate them on one OS consistently (match CI's).\n- **Never `--update-goldens` to make a red test green** without looking at the diff first — that silently accepts a visual regression as the new baseline.\n\n## Common Mistakes\n\n- `pumpWidget` for logic that could be a plain unit test (slow, indirect).\n- Asserting widget-tree internals instead of visible behavior.\n- No error\u002Fempty-state test.\n- Golden files regenerated blindly, hiding a visual regression.\n- A layout test that only runs at the default device size and text scale 1.0.\n\n## Red Flags\n\n- The test passes before the production code exists (tests a fake).\n- Every test boots the full app.\n- Only the happy path is covered.\n- No test exercises text scale 2.0 on a screen that changed layout.\n","# Flutter Testing\n\n## Overview\n\nTest-first in Flutter (see tdd-workflow). Three layers, each for a different question: does the logic work, does the widget behave, does it look right.\n\n**Core principle:** Most tests are fast unit + widget tests. Golden tests guard appearance; integration tests guard whole flows — use them sparingly.\n\n## Test layers\n\n| Layer | Question | Tool |\n|-------|----------|------|\n| Unit | Does the controller\u002Flogic compute correctly? | `flutter_test`, mock the repository |\n| Widget | Does the widget render state and respond to taps? | `testWidgets` + `pumpWidget` + finders |\n| Golden | Does it match the approved pixels? | `matchesGoldenFile` |\n| Integration | Does the whole flow work on a device? | `integration_test` |\n\n## Widget test example\n\n```dart\ntestWidgets('shows error view and retries', (tester) async {\n  final controller = FakeTaskController()..emitError('boom');\n  await tester.pumpWidget(wrap(TaskListScreen(controller: controller)));\n  await tester.pump();\n\n  expect(find.text('boom'), findsOneWidget);\n  await tester.tap(find.byType(RetryButton));\n  await tester.pump();\n  expect(controller.loadCalled, isTrue);   \u002F\u002F intent reached the controller\n});\n```\n\n## Rules\n\n- **Unit-test controllers\u002Flogic without pumping a widget** — that's the payoff of keeping logic out of widgets (see flutter-state-management).\n- **Widget tests assert observable behavior** (text visible, tap triggers intent), not internal structure.\n- **Mock the repository\u002Fports**, not the widget under test. Prefer a hand-written fake or `mocktail` per the app's convention.\n- **Golden tests:** commit the golden, review changes deliberately; regenerate only when the change is intended.\n- Cover loading, data, empty, and error states — the branches most likely to ship broken.\n- `pump` vs `pumpAndSettle`: use `pump` for controlled frames, `pumpAndSettle` to drain animations — never rely on real timers.\n\n## Matrix test: size, text scale, dark mode\n\nA widget test that only runs at the default size and text scale misses the most common mobile layout bug — overflow at larger text scales. See `mobile-visual-self-review` for the full size matrix and the worked `PriceRow` example (verified: passes at text scale 1.0 everywhere, overflows by 82px at 360×640\u002F2.0). The shape:\n\n```dart\ntester.view.physicalSize = const Size(360, 640) * 3;\ntester.view.devicePixelRatio = 3;\ntester.platformDispatcher.textScaleFactorTestValue = 2.0;\naddTearDown(tester.view.reset);\naddTearDown(tester.platformDispatcher.clearAllTestValues);\n```\n\nRun this as a real `testWidgets` case per matrix cell for any screen\u002Fcomponent whose layout changed — it is the failing test a layout change starts from (see `tdd-first`), not an afterthought bolted on once the happy path passes.\n\n## Accessibility guidelines (verified)\n\n`meetsGuideline` from `flutter_test`\u002F`flutter\u002Faccessibility`, run inside `tester.ensureSemantics()`:\n\n```dart\nfinal handle = tester.ensureSemantics();\nawait expectLater(tester, meetsGuideline(androidTapTargetGuideline));   \u002F\u002F 48x48\nawait expectLater(tester, meetsGuideline(iOSTapTargetGuideline));       \u002F\u002F 44x44\nawait expectLater(tester, meetsGuideline(labeledTapTargetGuideline));   \u002F\u002F every tappable has a label\nawait expectLater(tester, meetsGuideline(textContrastGuideline));\nhandle.dispose();\n```\n\nRun these against every new or changed interactive widget's test, not just a dedicated accessibility suite.\n\n## Golden test pitfalls (verified)\n\n- **Fonts:** by default, text renders as box glyphs in a golden unless the app's real fonts are loaded in `flutter_test_config.dart` (`loadAppFonts()` or equivalent) — a golden taken without that setup locks in boxes, not the real typography. Use goldens for layout\u002Fshape verification, or load the fonts first.\n- **OS differences:** text rendering and anti-aliasing differ per OS, so the same golden can legitimately differ on macOS vs Linux CI. Tag golden tests (`@Tags(['golden'])`) and generate\u002Fupdate them on one OS consistently (match CI's).\n- **Never `--update-goldens` to make a red test green** without looking at the diff first — that silently accepts a visual regression as the new baseline.\n\n## Common Mistakes\n\n- `pumpWidget` for logic that could be a plain unit test (slow, indirect).\n- Asserting widget-tree internals instead of visible behavior.\n- No error\u002Fempty-state test.\n- Golden files regenerated blindly, hiding a visual regression.\n- A layout test that only runs at the default device size and text scale 1.0.\n\n## Red Flags\n\n- The test passes before the production code exists (tests a fake).\n- Every test boots the full app.\n- Only the happy path is covered.\n- No test exercises text scale 2.0 on a screen that changed layout.\n",{"name":5,"source":24,"category":25,"tech_stack":26,"description":7},"flutter\u002Fagent-plugins (BSD-3-Clause), adapted","testing","Flutter","main","910394a0b6db9fc8c9a8f36328ec421d3ebd8b38","catalog\u002Fagents\u002Fmobile-developer\u002Fskills\u002Fflutter-testing",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-testing",{"tool":42,"command":43},"bunx","bunx skills add makifbaysal\u002Ftasktrooper --skill flutter-testing",{"tool":45,"command":46},"pnpm","pnpm dlx skills add makifbaysal\u002Ftasktrooper --skill flutter-testing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fmobile-developer\u002Fskills\u002Fflutter-testing\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",[],[]]