Repository inventory

harishwarrior/flutter-claude-skills

Skills indexed from this repository, with install-style signals scoped to the repo.
1 skills9 GitHub stars0 weekly installsPythonGitHubOwner profile

Overview

This skill is a comprehensive Flutter testing assistant that helps you create, write, and analyze tests across data, domain, and presentation layers. It codifies patterns for unit, widget, Riverpod, and integration tests, plus mocking, fakes, and test helpers to keep tests reliable and maintainable.

How this skill works

The skill inspects your test targets and recommends layer-specific patterns: repository tests mock DAOs/APIs, provider tests override dependencies, widget tests use keys and screen size setup. It provides concrete examples for stubbing success and failure cases, Riverpod container helpers, GetIt setup/cleanup, and database fakes so tests remain isolated and deterministic.

When to use it

  • When writing new unit tests for repositories, services, or DAOs
  • When creating widget tests that require keys, screen size, or platform overrides
  • When testing Riverpod providers and provider state transitions
  • When setting up mocks and fakes with Mockito or FakeDatabase
  • When debugging flaky tests or enforcing deterministic behavior
  • When preparing coverage and CI-friendly test suites

Best practices

  • Follow Given-When-Then naming and structure for every test
  • Mock dependencies, never mock providers directly; override provider internals
  • Reset GetIt, dispose streams, and close controllers in tearDown
  • Use keys, set tester.view.physicalSize and devicePixelRatio in widget tests
  • Cover success and failure paths, loading and error states, and edge cases

Example use cases

  • Repository test: mock DAO to return data and verify repository maps it correctly
  • Widget test: add a Key to a button, set screen size, tap by key, and pumpAndSettle
  • Riverpod test: create a ProviderContainer with overrides and assert notifier state
  • Database test: use FakeDatabase and FakePathProviderPlatform for DAO integration
  • Async control: use Completer to assert loading indicator appears and then resolves

FAQ

Override provider dependencies instead of mocking the provider itself. Register mocks or fakes for services and repositories and inject them into the provider.

How do I keep widget tests deterministic?

Set tester.view.physicalSize and devicePixelRatio, use keys for finds, avoid hard delays, and use pump/pumpAndSettle or Completer-based control for async.

1 skills

More from this maintainer
Other repositories and skills published under the same GitHub owner.
Skills library
Jump back to the full directory or explore grouped topics.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational