flutter-add-widget-test
flutter add widget test
What it does
- Setup & Configuration
- Core Components
- Workflow: Implementing a Widget Test
- Interaction & State Management
- WidgetTester: The primary interface for building and interacting with widgets in the test environment. Provided automatically by the testWidgets() function.
- Finder: Locates widgets in the test environment (e.g., find.text('Submit'), find.byType(TextField), find.byKey(Key('submitbtn'))).
- Matcher: Verifies the presence or state of widgets located by a Finder (e.g., findsOneWidget, findsNothing, findsNWidgets(2), matchesGoldenFile).
Requirements & configuration
- [ ] Step 2: Build the widget. Call await tester.pumpWidget(MyWidget()) to render the UI. Wrap the widget in a MaterialApp or Directionality widget if it requires inherited directional or theme data.
Derived from the skill's own SKILL.md documentation · extracted 2026-07-23
flutter-add-widget-test FAQ
What does the flutter-add-widget-test skill do?
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. Setup & Configuration Core Components
What does flutter-add-widget-test require?
[ ] Step 2: Build the widget. Call await tester.pumpWidget(MyWidget()) to render the UI. Wrap the widget in a MaterialApp or Directionality widget if it requires inherited directional or theme data.
How do I install flutter-add-widget-test?
Run: npx -y skills add https://github.com/flutter/skills --skill flutter-add-widget-test --agent claude-code — the source lives at github.com/flutter/skills.
Maintain flutter-add-widget-test?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[](https://getagentictools.com/skills/flutter-skills-flutter-add-widget-test?ref=badge) npx agentictools info skills/flutter-skills-flutter-add-widget-test The second line is the CLI lookup for this page — handy in READMEs and docs.