dart-guide
Installation
SKILL.md
Dart Guide
Applies to: Dart 3.0+, Sound Null Safety, Flutter, Server-side Dart
Core Principles
- Sound Null Safety: The type system guarantees non-nullable by default; nullable types are explicit
- Async by Design: Use Futures, Streams, and async/await for all I/O and event-driven logic
- Immutability First: Prefer
finallocals,constconstructors, and immutable data structures - Composition Over Inheritance: Use mixins, extension methods, and sealed class hierarchies
- Effective Dart: Follow official Effective Dart style for naming, documentation, and API design
Guardrails
Version & Dependencies
- Use Dart 3.0+ with sound null safety enabled (no
// @dart=2.xopt-outs) - Manage dependencies with
pubspec.yaml; rundart pub getafter changes - Pin dependency versions with caret syntax (
^1.2.0) for libraries, exact for apps
Related skills