Use this skill to apply practical Flutter widget testing patterns for rendering, interaction, state-driven UI, navigation intent, and accessibility-oriented assertions without relying on brittle tree details.
This skill provides concrete patterns for Flutter widget tests.
It is intended for:
Use flutter-testing to choose the right seam.
Use this skill once the seam is clearly a widget test.
Prefer:
pumpWidget helper when the project has shared app scaffoldingMaterialApp, router, localization, or providersAvoid:
Prefer assertions on:
Avoid:
Prefer:
tester.tap, enterText, drag, and user-like interactionspump or pumpAndSettle after state changesAvoid:
Prefer:
find.textfind.byType when the type is part of the UI contractfind.byKey when the project uses stable keys intentionallyAvoid:
For navigation intent:
For state-driven UI:
Avoid:
Use golden tests only when:
Do not default to goldens for normal behavior verification.
Prefer checking:
Avoid:
When used with tdd-red-green-refactor:
After applying this skill, report: