# Provide Mock Data

> Process for creating mock data sources in the infrastructure layer.

- Skill: `anoopsg/provide-mock-data` (Agent Skill)
- Install (CLI): `npx skillmds@latest add anoopsg/provide-mock-data`
- Raw SKILL.md: https://api.skillmd.com/api/skills/anoopsg/provide-mock-data/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: anoopsg (https://skillmd.com/u/anoopsg)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/anoopsg/provide-mock-data

---


# Provide Mock Data

When you need to create mock data for development or prototyping, follow these guidelines:

1. **Location**: Place mock data files inside the `lib/src/infrastructure/_mock/` directory.
2. **Naming**: Name the file using the domain name suffixed with `_mock.dart` (e.g., `notifications_mock.dart`).
3. **Structure**: 
   - Provide a pure function or constants to generate the mock data.
   - Do NOT use singletons or hold state within the mock data file itself. State should be managed by Riverpod providers/notifiers.
4. **Integration**: Create a repository class (e.g., `NotificationsRepository`) that uses the mock data generator to simulate API responses, including adding artificial delays using `Future.delayed` to simulate network latency.
5. **Separation of Concerns**: The notifier should handle all local state updates, while the repository strictly handles the "network" (mock) operations.

