What problem does it solve?
Mocking Flutter/Dart tests often requires code generation or heavy boilerplate. Mocktail provides a no-codegen approach and guides when to use mocks, fakes, or real objects to keep tests fast and readable.
Core Features & Use Cases
- Mocking without code generation: Use Mocktail's noSuchMethod-based mocks to verify interactions and stub responses.
- Fallback values: Register fallback values for non-nullable custom types used with argument matchers.
- Stubbing & verification: Stub methods with when/thenReturn/thenAnswer and verify interactions using verify/verifyNever/called(n).
- Argument matchers: Use any, captureAny, and other matchers to flexibly assert calls.
Quick Start
Create mocks by extending Mock and implementing your service, then stub methods with when and thenReturn and verify interactions.