kevmoo avatar

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-code

Installs 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.yaml specifies 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

More from kevmoo/dash_skills

All 8

Recommended

1juliusbrussee avatarcavemanjuliusbrussee/cavemanUltra-compressed communication mode. Cuts output tokens 65% (measured) by speaking like caveman while keeping full technical accuracy. Supports intensity levels618.3Kskills.sh installs
2mattpocock avatargrill-memattpocock/skillsA relentless interview to sharpen a plan or design.1.5Mskills.sh installs
3shadcn avatarimproveshadcn/improveSurvey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on s40Kskills.sh installs
4obra avatarsystematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes326.7Kskills.sh installs
5forrestchang avatarkarpathy-guidelinesforrestchang/andrej-karpathy-skillsBehavioral guidelines to reduce common LLM coding mistakes through explicit assumptions, simplicity, and verifiable success criteria.17.9Kskills.sh installs
6vercel-labs avatarfind-skillsvercel-labs/skillsHelps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express int4.3Mskills.sh installs