flutter-testing
/flutter-testing
Writes and runs Flutter tests (unit, cubit or bloc, repository, widget, integration) following the project's existing test setup. Use ONLY when the developer explicitly asks for tests, test setup or a test run; never add tests to other tasks.
- Author
- imdanishk ↗
- Repository
- flutter-ai-kit ↗
- Licence
- Apache-2.0
- Last repository change
- 13.11.2026
Assessment and security
- Files in this package
- 2
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 13.11.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
Writes and runs Flutter tests (unit, cubit or bloc, repository, widget, integration) following the project's existing test setup. Use ONLY when the developer explicitly asks for tests, test setup or a test run; never add tests to other tasks.
Original author description
Writes and runs Flutter tests (unit, cubit or bloc, repository, widget, integration) following the project's existing test setup. Use ONLY when the developer explicitly asks for tests, test setup or a test run; never add tests to other tasks.
How it works
- Steps
- Rules
SKILL.md preview
--- name: flutter-testing description: Writes and runs Flutter tests (unit, cubit or bloc, repository, widget, integration) following the project's existing test setup. Use ONLY when the developer explicitly asks for tests, test setup or a test run; never add tests to other tasks. license: Apache-2.0 --- # Flutter testing (on demand only) Do not use this skill unless the developer asked for tests in this request. Other skills never add tests on their own; if a task would benefit from tests, say so in one line and stop. ## Steps 1. **Read the project's test setup.** Look at `test/` and `integration_test/` (layout, naming, helpers), `dev_dependencies` in `pubspec.yaml` (`flutter_test`, `bloc_test`, `mocktail`, `mockito`, `patrol`, `integration_test`), the project profile and any testing rules in `AGENTS.md`. Copy what exists: the same mock library, the same folder mirror of `lib/`, the same helper functions. Where a project rule and this skill disagree, the project rule wins. 2. **If there is no test setup,** propose the smallest one and ask before adding a package: `flutter_test` (in the SDK) and `mocktail`; plus `bloc_test` when the project uses Cubit or Bloc. Do not add a coverage tool, golden-test tool or UI driver unless asked. 3. **Agree on scope in one line** (which classes, which layer, which cases) when the request is broad. Default order of value: state classes (cubit, bloc or notifier) including the error path; repositories with the data source mocked; then one widget test per page that shows loading, data and error. Integration tests only when asked, and say they are slower and need a device or emulator. 4. **Write the tests** from `references/patterns.md`: test behaviour (what state sequence results from an action), not implementation details; one reason to fail per test; mock only the edges (repository, data source, clock). Do not test generated files (`*.g.dart`, `*.freezed.dart`, `*.gr.dart`) or plain data classes. 5. **Run them,** with the `fvm` prefix when `.fvmrc` exists: `flutter test test/path_test.dart` for the files you wrote, then the whole `flutter test` if time allows. Report the result as it is. If the run cannot happen (no SDK in the environment, missing generated files or secrets), say what was not run. 6. **When a test fails,** find out whether the test or the app code is wrong. Never weaken or delete a test to make it pass. If the app code has a bug, report it with the file and line and ask before changing app code that is outside the request. 7. **Finish** with: files added, what each covers, what is deliberately not covered, the command to run them, and the result. ## Rules - Never put real keys, tokens or personal data in tests or fixtures. - Do not make tests depend on the network, the clock, random values or the order other tests run in. - A new test package changes `pubspec.yaml`: that is a package addition, so ask first. - Android and iOS differences matter only for integration tests and plugins: plugin calls in unit tests need mocks of the platform channel or the plugin's interface; see Flutter's "Plugins in Flutter tests" page.
Files in this package (2)
- SKILL.md 3 KB
- references/patterns.md 5 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · imdanishk/flutter-ai-kit | 90 | Apache-2.0 |
| HoangNguyen0403/agent-skills-standard | 100 | MIT |
| moustafadev/flutter-ai-skills | 100 | MIT |
| Dee9975/cc-skills-flutter | 100 | MIT |
| Albaylar/Mobile-Development-Kit | 100 | MIT |
| testland/qa | 100 | MIT |
| abdukabirov/flutter-agent-skills | 100 | MIT |
| thiennc-tesoglobal/flutter-skills | 100 | BSD-3-Clause |
| ethiel97/flutter-clean-riverpod-skills | 100 | MIT |
Database snapshot: 13.11.2026 · package version d794b36b98c0 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100bloc-cubit
Use when working with Flutter Bloc/Cubit state management. Covers when to choose Bloc vs Cubit, how to use bloc and flutter_bloc together, lifecycle, testing, and safe defaults. - 100flutter-bloc-state-management
Implement BLoC/Cubit state, events, transitions, and async concurrency in Flutter. Use for BLoC/Cubit feature logic, debounced/cancellable events, state rendering, or bloc tests—not generic widget-only work. - 100clean-arch-testing
Use when writing or reviewing tests for a Flutter Clean Architecture + Bloc app: unit tests for use cases and entities, mapper and repository tests, bloc_test for cubits/blocs, widget tests with mocked cubits, golden tests. Test file layout and what to mock at each layer. - 100flutter-bloc
Bloc and Cubit state management with flutter_bloc — Cubit vs Bloc, events and states as sealed classes, emit and on<Event> handlers, event transformers (droppable, restartable, sequential, debounce via bloc_concurrency), BlocProvider/MultiBlocProvider, RepositoryProvider,… - 100bloc
Best practices for Bloc state management in Flutter/Dart, covering Cubit versus Bloc, event and state naming, sealed classes with Equatable, the Page/View split with BlocProvider, BlocBuilder, BlocListener, and BlocSelector. Use when writing, modifying, or reviewing code that… - 95testing-flutter
Testing Flutter 3.47 / BLoC v9 / Riverpod 3 - Stratégie Complète. Use when writing tests, reviewing test coverage, or setting up testing.