dart-3-updates

dart-3-updates is a skill for Claude Code from evanca/flutter-ai-rules. It costs 42 tokens per session (2,040 once invoked), scanned A, original, MIT.

A guide to modern Dart 3 language features, including pattern matching, exhaustive switch logic, records, and destructuring. Dart is the programming language commonly used with Flutter and other Dart applications.

In plain words
What is it for?
Use it when writing switch statements, refactoring if-else chains, creating data classes, choosing records or classes, destructuring values, or updating pre-Dart-3 code.
Why use it?
It helps replace older branching and data-handling code with Dart 3 syntax while choosing suitable forms for values and classes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the flutter-ai-skills plugin — 37 skills shipped together

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

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/evanca/flutter-ai-rules/dart-3-updates
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add evanca/flutter-ai-rules --skill dart-3-updates
Clone the repo
git clone --depth 1 https://github.com/evanca/flutter-ai-rules

Made for: Claude Code.

Or install flutter-ai-skills, the plugin that ships this one along with the rest of its 37 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dart-3-updates

README.md
[![agentmods](https://agentmods.dev/badge/skills/evanca/flutter-ai-rules/dart-3-updates.svg)](https://agentmods.dev/skills/evanca/flutter-ai-rules/dart-3-updates)
Your own site
<a href="https://agentmods.dev/skills/evanca/flutter-ai-rules/dart-3-updates"><img src="https://agentmods.dev/badge/skills/evanca/flutter-ai-rules/dart-3-updates.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,040 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00042 $0.02040
Opus 5 $0.00021 $0.01020
Sonnet 5 $0.00008 $0.00408
Haiku 4.5 $0.00004 $0.00204

Measured 9d ago against content hash 4352f87bc8a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

dart-3-updates scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/dart-3-updates/SKILL.md · 279 lines

How it starts

The opening of the file, as written. The whole thing — 279 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

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

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 — break is not required.
  • Non-empty cases can end with continue, throw, or return.
  • Use default or _ to handle unmatched values.
  • Empty cases fall through; use break to prevent fallthrough in an empty case.
  • Use continue with a label for non-sequential fallthrough.
  • Use logical-or patterns (case a || b) to share a body between cases.

switch expressions

final color = switch (shape) {
  Circle() => 'red',
  Square() => 'blue',
  _ => 'unknown',
};
  • Omit case; use => for bodies; separate cases with commas.
  • Default must use _ (not default).
  • Produces a value.

Exhaustiveness

  • Dart checks exhaustiveness in switch statements and expressions at compile time.
  • Use default/_, enums, or sealed types to satisfy exhaustiveness.

Read the full file on GitHub · 279 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 279 lines · 42 tokens per session scan A 4352f87bc8a4

Subscribe to this mod's changes

dart-3-updates is a skill published in the GitHub repository evanca/flutter-ai-rules (635 stars, last pushed 8d ago), licensed MIT. It adds 42 tokens to every session and 2,040 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

dart-expert

Expert-level Dart, Flutter, mobile development, and cross-platform apps. Use when the user mentions Flutter, mobile, cross platform, or widgets, or when the task involves Dart Language or Flutter Framework.

personamanagmentlayer/pcl · 44 tokens

dart-sdk-changelog

Expert guide and lookup reference for the Dart SDK CHANGELOG, version history, experimental features, macros, and augmentations from Dart 1.x to modern Dart 3.x. Use this skill whenever the user asks "what's new in Dart X", "what's new in 3.13", "what's new in 3.12", asks how to find the minimum SDK version (minSdk)…

RandalSchwartz/dart-sdk-skills · 147 tokens

at_client_skills-sdk

Use this skill when a developer is building a Dart or Flutter app that depends on atclient or atclientflutter from pub.dev, stores or shares data via the Atsign Protocol, needs onboarding (CRAM new-atsign, atKeys file, keychain, APKAM) or APKAM enrollment, or asks about AtCollection , CItem , Query , sub-collections…

atsign-foundation/at_client_sdk · 232 tokens

signals-dart

Advanced reactive state primitives, collections, mixins, and utilities of signalscore.

rodydavis/signals.dart · 20 tokens

signals-migration-6-to-7

Detailed guidelines, patterns, and rules for migrating codebases from signals.dart version 6.x to version 7.x.

rodydavis/signals.dart · 33 tokens

standalone-python-scripts

Skill "standalone-python-scripts" from iloveitaly/llm-ide-rules, covering standalone python scripts, /// script, requires-python = ">=3.13", dependencies = [] and ///.

iloveitaly/llm-ide-rules · 9 tokens