
Dart Modern Features
If you're working with Dart 3.0 or later, this teaches you the modern syntax that actually matters: records for multiple return values, pattern matching for destructuring JSON and data shapes, switch expressions instead of verbose switch statements, and sealed classes for exhaustive type checking. It also covers the smaller wins like extension types for zero-cost wrappers, null-aware collection elements, and dot shorthands for enums. The regex patterns for discovering refactoring opportunities are genuinely useful. Honestly, if you learned Dart before 3.0 or you're still writing switch statements with breaks everywhere, this will save you from looking dated and make your code measurably cleaner.
- skills.sh installs
- 368
- GitHub stars
- 148
- last updated
- Aug 21, 2026
Install
$ npx -y skills add kevmoo/dash_skills --skill dart-modern-features --agent claude-codeInstalls into .claude/skills of the current project.
Files
Dart Modern Features
1. When to use this skill
Use this skill when:
- Writing or reviewing Dart code targeting Dart 3.0 or later.
- Refactoring legacy Dart code to use modern, concise, and zero-cost features such as records, extension types, class modifiers, null-aware collection elements, dot shorthands, and digit separators.
- Looking for idiomatic ways to handle multiple return values or zero-cost domain wrappers.
For pattern matching, switch expressions, and list/map/split destructuring, use
[dart-use-pattern-matching]. For converting closed class hierarchies into
exhaustive sealed types, use [dart-seal-type-hierarchies].
When NOT to use (Abstention Guardrails)
Do NOT apply modern features or refactor code when:
- SDK Constraint < 3.0.0: The package's
pubspec.yamlspecifies an SDK constraint that supports Dart 2.x (e.g.,sdk: '>=2.19.0 <4.0.0'). Refactoring to Dart 3 features will introduce syntax errors for Dart 2 users. - Public API Records with > 3 Fields: Records work well for 2–3 return values or internal tuples, but complex public API payloads are clearer and more extensible as dedicated classes or extension types.
Sponsors
Details
- Repository
- github.com/kevmoo/dash_skills
- First seen
- Jun 3, 2026