SKILL Instructions

Flutter Widget Testing

Test Flutter widgets and golden files

claude
cursor
chatgpt
#flutter
#testing
#golden
#qa

About

Patterns for `flutter_test`: pump, find, expect, and golden tests for UI regressions.

Metadata (SKILL.md frontmatter)

name
flutter-testing-widgets
version
1.0.0

Instructions

Flutter Testing

  • testWidgets + tester.pumpWidget(...); use pumpAndSettle sparingly.
  • Find by semantics: find.byKey, find.text.
  • Golden tests: expectLater(find.byType(App), matchesGoldenFile('app.png')).
  • Mock providers with Riverpod ProviderScope(overrides: [...]).