Remote OpenClaw
Menu
SkillsMCPPluginsFree guideDigestSubmit MCPSkillPluginMCPMCP, plugin, or skillAdvertise
Remote OpenClaw
SkillsMCPPluginsFree guideDigestSubmit MCPSkillPluginMCPMCP, plugin, or skillAdvertise

Featured

Reach 53,000+ AI builders from just $0.50 a click

You only pay for clicks, never impressions - and it's far cheaper than Google Ads, with no monthly lock-in.

Advertise from $0.50/click →
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free →
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free →
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now →
Run OpenClaw 24/7 on a Hostinger VPS with 20% off logoRun OpenClaw 24/7 on a Hostinger VPS with 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep it live 24/7. Get 20% off with this link.

Launch on Hostinger →
Deploy your Hermes agent in 60 seconds, live 24/7, 10% off with code ZACAARON10 logoDeploy your Hermes agent in 60 seconds, live 24/7, 10% off with code ZACAARON10

Launch Hermes on Hostinger in about 60 seconds, connect Telegram & Discord, and keep it live 24/7. Use code ZACAARON10 for 10% off.

Launch on Hostinger →
Reach 53,000+ AI builders from just $0.50 a click

You only pay for clicks, never impressions - and it's far cheaper than Google Ads, with no monthly lock-in.

Advertise from $0.50/click →
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free →
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free →
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now →
Run OpenClaw 24/7 on a Hostinger VPS with 20% off logoRun OpenClaw 24/7 on a Hostinger VPS with 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep it live 24/7. Get 20% off with this link.

Launch on Hostinger →
Deploy your Hermes agent in 60 seconds, live 24/7, 10% off with code ZACAARON10 logoDeploy your Hermes agent in 60 seconds, live 24/7, 10% off with code ZACAARON10

Launch Hermes on Hostinger in about 60 seconds, connect Telegram & Discord, and keep it live 24/7. Use code ZACAARON10 for 10% off.

Launch on Hostinger →
Reach 53,000+ AI builders from just $0.50 a click

You only pay for clicks, never impressions - and it's far cheaper than Google Ads, with no monthly lock-in.

Advertise from $0.50/click →
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free →
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free →
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now →
Run OpenClaw 24/7 on a Hostinger VPS with 20% off logoRun OpenClaw 24/7 on a Hostinger VPS with 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep it live 24/7. Get 20% off with this link.

Launch on Hostinger →
Deploy your Hermes agent in 60 seconds, live 24/7, 10% off with code ZACAARON10 logoDeploy your Hermes agent in 60 seconds, live 24/7, 10% off with code ZACAARON10

Launch Hermes on Hostinger in about 60 seconds, connect Telegram & Discord, and keep it live 24/7. Use code ZACAARON10 for 10% off.

Launch on Hostinger →
Skills/flutter/agent-plugins/dart-use-pattern-matching
dart-use-pattern-matching logo

dart-use-pattern-matching

flutter/agent-plugins
784 installs3K stars
Run it on Hostinger →up to 70% off + an extra 10% with code ZACAARON10Free API →

Installation

npx skills add https://github.com/flutter/agent-plugins --skill dart-use-pattern-matching

Summary

Use switch expressions and pattern matching where appropriate

SKILL.md

Implementing Dart Patterns

Contents

  • Pattern Selection Strategy
  • Switch Statements vs. Expressions
  • Core Pattern Implementations
  • Workflows
  • Examples

Pattern Selection Strategy

Apply specific pattern types based on the data structure and desired outcome. Follow these conditional guidelines:

  • If validating and extracting from deserialized data (e.g., JSON): Use Map and List patterns to simultaneously check structure and destructure key-value pairs.
  • If handling multiple return values: Use Record patterns to destructure fields directly into local variables.
  • If executing type-specific behavior (Algebraic Data Types): Use Object patterns combined with sealed classes to ensure exhaustiveness.
  • If matching numeric ranges or conditions: Use Relational (>=, <=) and Logical-and (&&) patterns.
  • If multiple cases share logic: Use Logical-or (||) patterns to share a single case body or guard clause.
  • If ignoring specific values: Use the Wildcard pattern (_) or a non-matching Rest element (...) in collections.

Switch Statements vs. Expressions

Select the appropriate switch construct based on the execution context:

  • If producing a value: Use a switch expression.
  • Syntax: switch (value) { pattern => expression, }
  • Rule: Each case must be a single expression. No implicit fallthrough. Must be exhaustive.
  • If executing statements or side effects: Use a switch statement.
  • Syntax: switch (value) { case pattern: statements; }
  • Rule: Empty cases fall through to the next case. Non-empty cases implicitly break (no break keyword required).

Core Pattern Implementations

Implement patterns using the following syntax and rules:

  • Logical-or (||): pattern1 || pattern2. Both branches must define the exact same set of variables.
  • Logical-and (&&): pattern1 && pattern2. Branches must not define overlapping variables.
  • Relational: ==, !=, <, >, <=, >= followed by a constant expression.
  • Cast (as): pattern as Type. Throws if the value does not match the type. Use to forcibly assert types during destructuring.
  • Null-check (?): pattern?. Fails the match if the value is null. Binds the variable to the non-nullable base type.
  • Null-assert (!): pattern!. Throws if the value is null.
  • Variable: var name or Type name. Binds the matched value to a new local variable.
  • Wildcard (_): Matches any value and discards it.
  • List: [pattern1, pattern2]. Matches lists of exact length unless a Rest element (... or ...var rest) is used.
  • Map: {"key": pattern}. Matches maps containing the specified keys. Ignores unmatched keys.
  • Record: (pattern1, named: pattern2). Matches records of the exact shape. Use :var name to infer the getter name.
  • Object: ClassName(field: pattern). Matches instances of ClassName. Use :var field to infer the getter name.

Workflows

Task Progress: Implementing Pattern Matching

Copy this checklist to track progress when implementing complex pattern matching logic:

  • [ ] Identify the data structure being evaluated (JSON, Record, Class, Enum).
  • [ ] Select the appropriate switch construct (Expression for values, Statement for side-effects).
  • [ ] Define the required patterns (Object, Map, List, Record).
  • [ ] Extract required data using Variable patterns (var x, :var y).
  • [ ] Apply Guard clauses (when condition) for logic that cannot be expressed via patterns.
  • [ ] Handle unmatched cases using a Wildcard (_) or default clause (if not using a sealed class).
  • [ ] Run exhaustiveness validator.

Feedback Loop: Exhaustiveness Checking

When switching over sealed classes or enums, you must ensure all subtypes are handled.

  1. Run validator: Execute dart analyze.
  2. Review errors: Look for "The type 'X' is not exhaustively matched by the switch cases" errors.
  3. Fix: Add the missing Object patterns for the unhandled subtypes, or add a Wildcard (_) case if a default fallback is acceptable.

Examples

JSON Validation and Destructuring

Use Map and List patterns to validate structure and extract data in a single step.

Input:

var data = {
  'user': ['Lily', 13],
};

Implementation:

if (data case {'user': [String name, int age]}) {
  print('User $name is $age years old.');
} else {
  print('Invalid JSON structure.');
}

Algebraic Data Types (Sealed Classes)

Use Object patterns with switch expressions to handle family types exhaustively.

Implementation:

sealed class Shape {}

class Square implements Shape {
  final double length;
  Square(this.length);
}

class Circle implements Shape {
  final double radius;
  Circle(this.radius);
}

// Switch expression guarantees exhaustiveness due to `sealed` modifier.
double calculateArea(Shape shape) => switch (shape) {
  Square(length: var l) => l * l,
  Circle(:var radius)   => math.pi * radius * radius,
};

Variable Swapping and Destructuring

Use variable assignment patterns to swap values or extract record fields without temporary variables.

Implementation:

var (a, b) = ('left', 'right');
(b, a) = (a, b); // Swap values

// Destructuring a function return
var (name, age) = getUserInfo();

Guard Clauses and Logical-or

Use when to evaluate arbitrary conditions after a pattern matches.

Implementation:

switch (shape) {
  case Square(size: var s) || Circle(size: var s) when s > 0:
    print('Valid symmetric shape with size $s');
  case Square() || Circle():
    print('Invalid or empty shape');
  default:
    print('Unknown shape');
}

Score

0–100
65/ 100

Grade

C

Popularity17/30

784 installs — growing adoption. Source repo has 2,728 GitHub stars.

Completeness27/30

Documented: full SKILL.md body, description, one-line install. Missing: category/license metadata.

Trust15/25

Community skill with a public GitHub source repository you can review.

Freshness6/15

No update timestamp is tracked for this skill in our catalog.

Scored automatically from popularity, completeness, trust, and freshness — computed only from data in our catalog, never fabricated.

Proud of your score? Add this badge to your README.

Paste a snippet into your GitHub README. The badge updates automatically and links back to this page.

Dart Use Pattern Matching skill score badge previewScore badge

Markdown

[![Dart Use Pattern Matching skill](https://www.remoteopenclaw.com/skills/flutter/agent-plugins/dart-use-pattern-matching/badges/score.svg)](https://www.remoteopenclaw.com/skills/flutter/agent-plugins/dart-use-pattern-matching)

HTML

<a href="https://www.remoteopenclaw.com/skills/flutter/agent-plugins/dart-use-pattern-matching"><img src="https://www.remoteopenclaw.com/skills/flutter/agent-plugins/dart-use-pattern-matching/badges/score.svg" alt="Dart Use Pattern Matching skill"/></a>

Dart Use Pattern Matching FAQ

How do I install the Dart Use Pattern Matching skill?

Run “npx skills add https://github.com/flutter/agent-plugins --skill dart-use-pattern-matching” in your terminal. The skill is added to your agent's skills directory and picked up automatically on the next run — no restart or extra configuration needed.

What does the Dart Use Pattern Matching skill do?

Use switch expressions and pattern matching where appropriate The full SKILL.md on this page shows the exact instructions the skill gives your agent.

Is the Dart Use Pattern Matching skill free?

Yes. Dart Use Pattern Matching is a free, open-source skill published from flutter/agent-plugins. As with any third-party skill, review the source repository before installing it into an agent with sensitive access.

Does Dart Use Pattern Matching work with Claude Code and OpenClaw?

Yes. Skills use the portable SKILL.md format, so Dart Use Pattern Matching works with Claude Code, OpenClaw, Codex, Hermes, and any other agent that reads SKILL.md skills.

Featured

Reach 53,000+ AI builders from just $0.50 a click

You only pay for clicks, never impressions - and it's far cheaper than Google Ads, with no monthly lock-in.

Advertise from $0.50/click →
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free →
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free →
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now →
Run OpenClaw 24/7 on a Hostinger VPS with 20% off logoRun OpenClaw 24/7 on a Hostinger VPS with 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep it live 24/7. Get 20% off with this link.

Launch on Hostinger →
Deploy your Hermes agent in 60 seconds, live 24/7, 10% off with code ZACAARON10 logoDeploy your Hermes agent in 60 seconds, live 24/7, 10% off with code ZACAARON10

Launch Hermes on Hostinger in about 60 seconds, connect Telegram & Discord, and keep it live 24/7. Use code ZACAARON10 for 10% off.

Launch on Hostinger →
Reach 53,000+ AI builders from just $0.50 a click

You only pay for clicks, never impressions - and it's far cheaper than Google Ads, with no monthly lock-in.

Advertise from $0.50/click →
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free →
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free →
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now →
Run OpenClaw 24/7 on a Hostinger VPS with 20% off logoRun OpenClaw 24/7 on a Hostinger VPS with 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep it live 24/7. Get 20% off with this link.

Launch on Hostinger →
Deploy your Hermes agent in 60 seconds, live 24/7, 10% off with code ZACAARON10 logoDeploy your Hermes agent in 60 seconds, live 24/7, 10% off with code ZACAARON10

Launch Hermes on Hostinger in about 60 seconds, connect Telegram & Discord, and keep it live 24/7. Use code ZACAARON10 for 10% off.

Launch on Hostinger →
Reach 53,000+ AI builders from just $0.50 a click

You only pay for clicks, never impressions - and it's far cheaper than Google Ads, with no monthly lock-in.

Advertise from $0.50/click →
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free →
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free →
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now →
Run OpenClaw 24/7 on a Hostinger VPS with 20% off logoRun OpenClaw 24/7 on a Hostinger VPS with 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep it live 24/7. Get 20% off with this link.

Launch on Hostinger →
Deploy your Hermes agent in 60 seconds, live 24/7, 10% off with code ZACAARON10 logoDeploy your Hermes agent in 60 seconds, live 24/7, 10% off with code ZACAARON10

Launch Hermes on Hostinger in about 60 seconds, connect Telegram & Discord, and keep it live 24/7. Use code ZACAARON10 for 10% off.

Launch on Hostinger →
View on GitHub

Recommended skills

Browse all →
vercel-composition-patterns logo

vercel-composition-patterns

vercel-labs/agent-skills

259K installsInstall
find-skills logo

find-skills

vercel-labs/skills

2.6M installsInstall
frontend-design logo

frontend-design

anthropics/skills

694K installsInstall
grill-me logo

grill-me

mattpocock/skills

632K installsInstall
vercel-react-best-practices logo

vercel-react-best-practices

vercel-labs/agent-skills

572K installsInstall
agent-browser logo

agent-browser

vercel-labs/agent-browser

571K installsInstall

Browse

Skills by category

Frontend250Git198Data154Testing120Design105Docs103Security96Automation87Backend76Devops37Productivity29Mcp23

Related guides

Hand-picked reading to help you choose, install, and use agent skills.

GuideBest Openclaw Skills 2026GuideHow To Evaluate Openclaw Skill Before InstallingGuideOpenclaw Skills Complete Guide

Remote OpenClaw

AI agent skills directory, marketplace, and workflow hub for OpenClaw, Hermes Agent, Claude Code, Codex, and MCP-powered operator stacks.

The Agent Stack: weekly agent tooling digest, free.

Explore

  • Home
  • Skills Directory
  • Claude Code Skills
  • Codex Skills
  • MCP Clients
  • Marketplace
  • Hermes Ecosystem
  • Free guide
  • Learn
  • OpenClaw for Creators
  • OpenClaw for Founders
  • Blog
  • The Agent Stack (Digest)

More

  • Submit a Tool
  • Advertise
  • Playbook
  • Free Tools
  • API
  • Shipping
  • Contact
  • Terms
  • Privacy

Know a company that should advertise here? Refer them and earn 10% — up to $300 per referral.

© 2026 Remote OpenClaw
Fazier badgeFeatured on Twelve ToolsFeatured on Wired BusinessRemote OpenClaw - Featured on AI Agents DirectoryListed on Turbo0