flutter-testing

Create and execute Flutter unit, state management, and widget tests.

Updated Nov 23, 2025
One-click install
npx skills add https://github.com/manuelbrandner85/Weltenbibliothekapp --skill flutter-testing-manuelbrandner85
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flutter-testing
Source: https://github.com/manuelbrandner85/Weltenbibliothekapp/tree/main/.agents/skills/flutter-testing
Command: npx skills add https://github.com/manuelbrandner85/Weltenbibliothekapp --skill flutter-testing-manuelbrandner85

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires mockito, mocktail, build_runner, bloc_test, flutter_riverpod.

What problem does it solve?

This Skill addresses the inconsistency and inefficiency in Flutter testing by providing a structured, priority-based framework that ensures business logic is validated before UI components.

Core Features & Use Cases

  • Priority-Based Testing: Enforces a logical testing order (Repository → State → Widget → Golden) to maximize coverage of critical code paths.
  • Standardized Templates: Provides ready-to-use boilerplate for unit, BLoC, Provider, and Golden tests.
  • Use Case: When refactoring a complex BLoC or Repository, use this Skill to ensure all edge cases are covered by unit tests before verifying the UI rendering with widget tests.

Quick Start

Use the flutter-testing skill to generate a unit test template for the user repository implementation.

Frequently Asked Questions about flutter-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure Flutter unit and widget tests for better code reliability?

Structure Flutter testing using a priority-based workflow that validates Repositories and State management before moving to Widget and Golden tests. This approach maximizes coverage of critical business logic paths before verifying UI rendering.

What is the best way to test BLoC and Riverpod state management in Flutter?

Testing BLoC and Riverpod state management is standardized using ready-to-use boilerplate templates. The framework provides specific test structures for state management, ensuring all edge cases are covered during complex refactoring.

Do I need mockito or mocktail for Flutter dependency injection in tests?

Yes, you need either mockito or mocktail for Flutter dependency injection in tests. The framework relies on these libraries to mock dependencies, alongside build_runner for any required code generation.

How do I perform visual regression testing with Golden tests in Flutter?

Perform visual regression testing with Golden tests by following the priority-based workflow. After validating unit and state logic, the framework provides standardized templates to execute Golden tests and verify UI component rendering.

Can I use this Flutter testing framework for refactoring complex repositories?

Yes, you can use this framework when refactoring complex repositories. It enforces a logical testing order to ensure all edge cases are covered by unit tests first, providing high code reliability before checking UI components.