AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Flutter Golden Testing

skill-anoopsg-agent-rules-flutter-golden-testing · by anoopsg

Step-by-step workflow for creating, configuring, and updating Flutter golden tests using the Alchemist package.

No reviews yet
0 installs
23 views
0.0% view→install

Install

$ agentstack add skill-anoopsg-agent-rules-flutter-golden-testing

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-anoopsg-agent-rules-flutter-golden-testing)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Flutter Golden Testing? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Flutter Golden Testing Skill

This skill outlines the step-by-step process for implementing and updating golden tests for Flutter widgets.

Step 1: Validation & Setup

  1. Check Dependencies: Ensure alchemist is present in the dev_dependencies of pubspec.yaml. If it is missing, install it:

``bash flutter pub add --dev alchemist ``

  1. Directory Structure: Create a goldens/ directory adjacent to your target test file to store the generated .png reference files.

Step 2: Test Scaffolding

Create the test file named [widget_name]_test.dart (or [widget_name]_golden_test.dart).

  1. Imports: Import the necessary packages (package:flutter_test/flutter_test.dart and package:alchemist/alchemist.dart).
  2. Setup Fonts/Assets: Call loadAppFonts() (if applicable) before running the tests to prevent text from rendering as the Ahem font.

Step 3: Implementation

Implement the test using alchemist APIs instead of the standard testWidgets.

  1. Use goldenTest: Define your test using the goldenTest function.
  2. Mock Externalities:
  • Disable or replace infinite animations (e.g., CircularProgressIndicator).
  • Mock network image requests (e.g., using mocktail_image_network or network_image_mock).
  1. Matrix Testing: Use GoldenTestGroup and GoldenTestScenario to lay out all possible widget states (e.g., loading, success, error) and variations (light/dark mode, text scaling) within a single test execution.

Step 4: Generation and Verification

  1. Generate Goldens: Run the following command to generate or update the reference images:

``bash flutter test --update-goldens ``

  1. Verify Output: Check that the .png files were correctly generated in the goldens/ directory.
  2. Gitignore Failures: Ensure **/failures/ is in the project's .gitignore so test failure artifacts are not accidentally committed.

Step 5: Updating Existing Goldens

If you are modifying an existing widget that already has golden tests, run the update command (flutter test --update-goldens) to regenerate the images. Never modify the .png files manually.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.