# Pedromneto97 Custom Skills Flutter Data Layer

> Flutter Data Layer (summary)

- Skill: `tomevault-io/pedromneto97-custom-skills-flutter-data-layer` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/pedromneto97-custom-skills-flutter-data-layer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/pedromneto97-custom-skills-flutter-data-layer/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/pedromneto97-custom-skills-flutter-data-layer

---


# Flutter Data Layer (summary)

Purpose: Short, opinionated defaults and pointers for implementing the data layer in a Flutter Clean Architecture app.

Defaults
- **HTTP client**: dio
- **Serialization**: json_serializable (codegen)
- **Error handling**: Only throw mapped/domain errors (example: 401 -> InvalidCredentialsException); rethrow unknown errors so callers can decide.

Details and examples are moved to the `references/` docs and `templates/` examples in this skill:

- Detailed repository & networking guidance: [references/datasource.md](references/datasource.md)
- Model & json_serializable guidance: [references/model.md](references/model.md)
- Working code templates: [templates/](templates/)

Rename guidance
- If an application only uses a remote source, prefer naming the component and folder `repository` (and use `Repository` suffix) instead of `datasource`. Templates use `repository` for that case.

Quick prompts
- "Scaffold a `User` model using `json_serializable` and a `UserRepositoryImpl` using `dio` that maps 401 -> invalid credentials."
- "Generate DTO tests: `fromJson`, `toJson`, and `toEntity()` round-trip for `UserResponse`."

---
> Source: [pedromneto97/custom-skills](https://github.com/pedromneto97/custom-skills) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-06-25 -->

