
Flutter add widget test
Guides the agent to write Flutter widget tests with WidgetTester for taps, scrolling
Flutter add widget test is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 3.2K
- Last commit
- License
- BSD-3-Clause
- Listing updated
Similar skills
About Flutter add widget test
This skill walks an agent through writing component-level Flutter tests with flutter_test. It covers the project setup (adding the test dependency, placing files under test/ with the _test.dart suffix), the core finder and matcher types, and a step-by-step checklist from building the widget to verifying the updated UI.
The skill also explains which pump method fits each situation: a single pump after a plain tap, pumpAndSettle for animations and async updates, and scrollUntilVisible for long lists. It includes a complete example that adds and dismisses items in a todo list, showing how the pieces fit together in one test.
The agent is expected to run the tests with the flutter test command in a Flutter project. The skill itself ships only its instructions file and no scripts.
When your agent uses it
Implement a component-level test using `WidgetTester` to verify UI rendering and user interactions (tapping, scrolling, entering text). Use when validating that a specific widget displays correct data and responds to events as expected.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
- Instructions only, no scripts(see the files on GitHub)
- License: BSD-3-Clause(see the files on GitHub)
From a static check of its 1 file (6 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the dart-flutter plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add flutter/agent-plugins
/plugin install dart-flutter@dart-flutterOr copy only this skill to ~/.claude/skills/flutter-add-widget-test:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/flutter/agent-plugins.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/flutter-add-widget-test &&
cp -R "$tmp/skills/flutter-add-widget-test" ~/.claude/skills/flutter-add-widget-test &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/flutter-add-widget-test inside it instead.
Copy the skill folder to ~/.agents/skills/flutter-add-widget-test to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/flutter/agent-plugins.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/flutter-add-widget-test &&
cp -R "$tmp/skills/flutter-add-widget-test" ~/.agents/skills/flutter-add-widget-test &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/flutter-add-widget-test inside it instead.
Copy the skill folder to ~/.cursor/skills/flutter-add-widget-test to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/flutter/agent-plugins.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/flutter-add-widget-test &&
cp -R "$tmp/skills/flutter-add-widget-test" ~/.cursor/skills/flutter-add-widget-test &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/flutter-add-widget-test inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/flutter/agent-plugins.git --path skills/flutter-add-widget-testOr copy the folder to ~/.gemini/skills/flutter-add-widget-test yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/flutter-add-widget-test:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/flutter/agent-plugins.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/flutter-add-widget-test &&
cp -R "$tmp/skills/flutter-add-widget-test" ~/.copilot/skills/flutter-add-widget-test &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/flutter-add-widget-test inside it instead.
Get the folder:
git clone --depth 1 https://github.com/flutter/agent-plugins.gitThen copy agent-plugins/skills/flutter-add-widget-test into your agent's skills folder as flutter-add-widget-test. Agents that support SKILL.md read one folder per skill.
What it does
- Test setup guidance
- Explains the dependency, folder layout and file naming needed before writing widget tests.
- Finder and matcher reference
- Summarises the common finders and matchers used to locate and check widgets.
- Step-by-step test checklist
- Gives an ordered workflow from defining a testWidgets case to re-running it until it passes.
- Interaction pumping rules
- Maps tapping, dragging, text entry and scrolling to the correct pump or settle calls.
- Worked todo list example
- Provides a full widget and test pair covering adding and dismissing items.
Good for
- Write a widget test that checks a login form shows the right error text
- Test that tapping a button updates a counter label on screen
- Verify a list screen scrolls to and displays a specific item
- Add a test that enters text into a search field and checks the results
Flutter add widget test FAQ
What does the skill need from my project?
It expects a Flutter project with the flutter_test package listed under dev_dependencies in pubspec.yaml, with test files placed in the test/ directory.
Does Flutter add widget test change my app code?
Its instructions focus on writing test files. It does not describe modifying the widget beyond the feedback loop of adjusting logic when a test fails.
How does the agent run the tests?
The checklist tells the agent to run flutter test followed by the path to the test file.
How do I install Flutter add widget test in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/flutter-add-widget-test to use it in all your projects, or to .claude/skills/flutter-add-widget-test in one project. Or install the dart-flutter plugin, which includes it: /plugin marketplace add flutter/agent-plugins, then /plugin install dart-flutter@dart-flutter.
Does Flutter add widget test run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Flutter add widget test?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Flutter add widget test?
The closest alternatives to Flutter add widget test are Flutter add integration test, Flutter testing skill, Dart add unit test, Dart generate test mocks and Dart flutter patterns.
Where this comes from
- Description: from the skill's own SKILL.md.
More from flutter/agent-plugins

Guides your agent to write and organize Dart and Flutter unit tests with package:test
- Open source
- 3.2K GitHub stars
- Developer tools

Sets up Flutter integration tests and turns MCP-driven UI exploration into repeatable
- Open source
- 3.2K GitHub stars
- Developer tools

Teaches agents to write Dart unit tests with generated Mockito mocks via build_runner
- Open source
- 3.2K GitHub stars
- Developer tools

Review Dart or Flutter API code against canonical API design principles
- Open source
- 3.2K GitHub stars
- Developer tools

Write clear docstrings, dartdoc and JSDoc for Dart, Python and TypeScript
- Open source
- 3.2K GitHub stars
- Files and documents

Run a multi-step pull request or local diff review with critique and synthesis
- Open source
- 3.2K GitHub stars
- Developer tools


