dart-3-updates
Use when writing switch statements, refactoring if-else chains, creating data classes, choosing records vs classes, destructuring values, or modernizing…
Skill by OzcanOrhanDemirci
Chalk Labs
Need help deploying dart-3-updates?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ozcanorhandemirci-dart-3-updates
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/dart-3-updates
What's inside
- Skill name
dart-3-updates- Description
- Use when writing switch statements, refactoring if-else chains, creating data classes, choosing records vs classes, destructuring values, or modernizing pre-Dart-3 code.
- License
- MIT
- Instructions
- 274 lines in SKILL.md · view on GitHub
Files (2)
- LICENSE.source
- SKILL.md
SKILL.md (first lines)
# 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 — `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
```dart
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.
```dart
sealed class Shape {}
class Circle extends Shape {}
class Square extends Shape {}
// Dart knows all subtypes — no default needed:
String describe(Shape s) => switch (s) {
Circle() => 'circle',
Square() => 'square',
};
```
### Guard clauses
```dart
switch (point) {
case (int x, int y) when x == y:
print('Diagonal: $x');
case (int x, int y):
print('$x, $y');
}
```
- Add `when condition` after a pattern to further constrain matching.
- Usable in `if-case`, `switch` statements, and `switch` expressions.
- If the guard is `false`, execution proceeds to the next case.
---
## 2. Patterns
Patterns represent the **shape** of a value for matching and destructuring.
### Uses
```dart
// Variable declaration
var (a, [b, c]) = ('str', [1, 2]);
// Variable assignment (swap)
(b, a) = (a, b);From OzcanOrhanDemirci/Mode_Code, MIT.
More from OzcanOrhanDemirci/Mode_Code
- 0.570score
i2c-bringup-diagnostician
OzcanOrhanDemirci
Use when users need to diagnose I2C bring-up failures on Arduino or ESP32-class boards, including no devices found, wrong readings, address conflicts…
SkillAFreshness: AClaude Code +9 - 0.565score
firebase-cloud-firestore
OzcanOrhanDemirci
Use when setting up Firestore, designing schemas, doing CRUD, creating listeners, paginating queries, configuring indexes, enabling offline persistence, or…
SkillAFreshness: AClaude Code +9 - 0.565score
appstore-review
OzcanOrhanDemirci
Checks an iOS/iPadOS/macOS app project against Apple's App Store Review Guidelines before submission.
SkillAFreshness: AClaude Code +9 - 0.565score
playstore-review
OzcanOrhanDemirci
Checks an Android app project against Google Play's Developer Program Policies before submission.
SkillAFreshness: AClaude Code +9 - 0.565score
cuda-profiling
OzcanOrhanDemirci
CUDA profiling skill for NVIDIA GPU performance analysis.
SkillAFreshness: AClaude Code +9 - 0.561score
openscad
OzcanOrhanDemirci
Create and render OpenSCAD 3D models.
SkillAFreshness: AClaude Code +9 - 0.558score
firebase-security-rules-auditor
Google LLC
Audits Firebase (Firestore, Cloud Storage) security rules for vulnerabilities, privilege escalation, role bypasses, create vs update inconsistencies, resource…
SkillAFreshness: AClaude Code +9 - 0.549score
firestore-rules-creation
Google LLC
Designs, authors, refactors, and hardens production-grade Cloud Firestore Security Rules (firestore.rules).
SkillAFreshness: AClaude Code +9 - 0.539score
domain-modeling
OzcanOrhanDemirci
Build and sharpen a project's domain model.
SkillAFreshness: AClaude Code +9 - 0.539score
codebase-design
OzcanOrhanDemirci
Shared vocabulary for designing deep modules.
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 5
- Last commit (this folder)
- Oct 18, 2026 (14 days ago)
- Last release
- Oct 15, 2026 (17 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/OzcanOrhanDemirci/Mode_Code
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from OzcanOrhanDemirci
- 0.570score
i2c-bringup-diagnostician
OzcanOrhanDemirci
Use when users need to diagnose I2C bring-up failures on Arduino or ESP32-class boards, including no devices found, wrong readings, address conflicts…
SkillAFreshness: AClaude Code +9 - 0.565score
firebase-cloud-firestore
OzcanOrhanDemirci
Use when setting up Firestore, designing schemas, doing CRUD, creating listeners, paginating queries, configuring indexes, enabling offline persistence, or…
SkillAFreshness: AClaude Code +9 - 0.565score
appstore-review
OzcanOrhanDemirci
Checks an iOS/iPadOS/macOS app project against Apple's App Store Review Guidelines before submission.
SkillAFreshness: AClaude Code +9 - 0.565score
playstore-review
OzcanOrhanDemirci
Checks an Android app project against Google Play's Developer Program Policies before submission.
SkillAFreshness: AClaude Code +9 - 0.565score
cuda-profiling
OzcanOrhanDemirci
CUDA profiling skill for NVIDIA GPU performance analysis.
SkillAFreshness: AClaude Code +9 - 0.561score
openscad
OzcanOrhanDemirci
Create and render OpenSCAD 3D models.
SkillAFreshness: AClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get dart-3-updates running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
dart-3-updates skill. Agent Mart. https://agentmart.dev/skills/ozcanorhandemirci-dart-3-updates (last updated 2026-10-24)