testing-flutter
Skill108 starsChanged 16 days agoMITView on GitHub
Testing Flutter 3.47 / BLoC v9 / Riverpod 3 - Stratégie Complète. Use when writing tests, reviewing test coverage, or setting up testing.
In this repository61 other files it gives its agents.
- docs/AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- .claude/references/angular/CLAUDE.mdCLAUDE.md
- .claude/references/flutter/CLAUDE.mdCLAUDE.md
- .claude/references/laravel/CLAUDE.mdCLAUDE.md
- .claude/references/paperclip/CLAUDE.mdCLAUDE.md
- .claude/references/reactnative/CLAUDE.mdCLAUDE.md
- .claude/references/svelte/CLAUDE.mdCLAUDE.md
- .claude/references/symfony/CLAUDE.mdCLAUDE.md
- .claude/references/vite/CLAUDE.mdCLAUDE.md
- .claude/references/vuejs/CLAUDE.mdCLAUDE.md
- aggregatesSkill
- api-gatewaySkill
- architectSkill
- architecture-clean-dddSkill
- architectureSkill
- asyncSkill
- atomic-tasksSkill
- coding-standardsSkill
- cqrsSkill
- ddd-patternsSkill
- debug-methodicalSkill
- design-md-conventionSkill
- docker-hadolintSkill
- doctrine-extensionsSkill
- documentationSkill
- domain-eventsSkill
- dynamic-workflowsSkill
- ecosystem-toolsSkill
- edge-computingSkill
- event-drivenSkill
- git-workflowSkill
- graphqlSkill
- i18nSkill
- kiss-dry-yagniSkill
- monorepoSkill
- multitenantSkill
- navigationSkill
- observabilitySkill
- parallel-worktreesSkill
- performanceSkill
- quality-toolsSkill
- remotionSkill
- security-flutterSkill
- security-reactnativeSkill
- security-reactSkill
- securitySkill
- security-symfonySkill
- socratic-brainstormSkill
- solid-principlesSkill
- state-managementSkill
- sub-agents-patternsSkill
- testing-pythonSkill
- testing-reactnativeSkill
- testing-reactSkill
- testingSkill
- testing-symfonySkill
- toolingSkill
- value-objectsSkill
- wasmSkill
- The first 60 shown.
The file
Files
Testing Flutter 3.44+ - Stratégie Complète
Versions : Flutter 3.44+ | Dart 3.12+ | BLoC v9 | Riverpod 3.0
Patterns de test 2026
BLoC v9 Tests avec bloc_test
// pubspec.yaml
dev_dependencies:
bloc_test: ^10.0.0
mocktail: ^1.0.0
// Test avec emit.isDone checks (BLoC v9)
blocTest<UserBloc, UserState>(
'emits [loading, loaded] when FetchUser is added',
build: () {
when(() => mockUseCase.call('123'))
.thenAnswer((_) async => User(id: '123', name: 'Alice'));
return UserBloc(getUserUseCase: mockUseCase);
},
act: (bloc) => bloc.add(const FetchUser('123')),
expect: () => [
const UserState(status: UserStatus.loading),
const UserState(status: UserStatus.loaded, user: User(id: '123', name: 'Alice')),
],
verify: (bloc) {
// Vérifier que le bloc respecte isDone (v9)
verify(() => mockUseCase.call('123')).called(1);
},
);Riverpod 3.0 Mutations Tests
// Test Riverpod 3.0 Mutations API
test('Mutation updates state correctly', () async {
final container = ProviderContainer();
// Initial state
final notifier = container.read(orderNotifierProvider('123').notifier);
expect(container.read(orderNotifierProvider('123')).value?.id, '123');
// Mutation
await notifier.updateOrder(Order(id: '123', name: 'Updated'));
// Verify state après mutation
expect(
container.read(orderNotifierProvider('123')).value?.name,
'Updated',
);
container.dispose();
});Source : Riverpod 3.0 Testing
This skill provides guidelines and best practices.
See ../../rules/07-testing-flutter.md for detailed documentation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

