# Dart

> Conventions and best practices for writing Dart code in this workspace.

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

---


# Dart coding conventions

- Prefer `final` over `var` where the value never changes.
- Use lowerCamelCase for variables and functions, UpperCamelCase for types.
- Keep functions small and focused; prefer pure functions where practical.
- Always handle errors explicitly; avoid swallowing exceptions silently.
- Add a doc comment (`///`) to every public declaration.
- Use `dart format` defaults (80-column width) for all files.
- Prefer collection literals and spread operators over imperative building.

