Agent skill · Data & Analytics

dart-3-updates

Use when writing switch statements, refactoring if-else chains, creating data classes, choosing records vs classes, destructuring values, or modernizing pre-Dart-3 code.

evancagithub.com/evancaGitHub ↗
claude-codecodexcursorwindsurfMIT
Install
npx skills add evanca/flutter-ai-rules --skill dart-3-updates --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 8 KB
Bundled scripts: none
Path: skills/dart-3-updates/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 604
Language: Shell

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Dart 3 Updates Skill Apply Dart 3 language features — branches, patterns, pattern types, and records — correctly and idiomatically. ## When to Use Use this skill when: * Writing or refactoring `switch` statements or `if-else` chains. * Creating new data-holding classes and deciding between sealed classes, records, or plain classes. * Destructuring values from maps, lists, records, or objects. * Modernizing pre-Dart-3 code to use patterns, exhaustiveness checks, or switch expressions. --- ## 1. Branches ### if / if-case ```dart // Standard if if (score >= 90) { grade = 'A'; } else if (score >= 80) { grade = 'B'; } else { grade = 'C'; } // if-case: match and destructure against a single pattern if (pair case [int x, int y]) { print('$x, $y'); } ``` - `if` conditions must evaluate to a `bool`. - In `if-case`, variables declared in the pattern are scoped to the matching branch. - If the pattern does not match, control flows to the `else` branch (if present). ### switch statements ```dart switch (command) { case 'quit': quit(); case 'start' || 'begin': // logical-or pattern startGame(); default: print('Unknown command'); } ``` - Each matched `case` body executes and jumps to the end —

What's inside
Steps it walks through
  1. When to Use
  2. 1. Branches
  3. if / if-case
  4. switch statements
  5. switch expressions
  6. Exhaustiveness
  7. Guard clauses
  8. 2. Patterns
  9. Uses
  10. Object patterns
  11. JSON / nested data validation
  12. 3. Pattern Types
  13. 4. Records
  14. Multiple return values
More from flutter-ai-rules
All skills →
About this skill
What does the dart-3-updates skill do?

Use when writing switch statements, refactoring if-else chains, creating data classes, choosing records vs classes, destructuring values, or modernizing pre-Dart-3 code.

How do I install it?

Run `npx skills add evanca/flutter-ai-rules --skill dart-3-updates --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From evanca/flutter-ai-rules, a repository with 604 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going