Skill / SKILL.md

Dart Use Pattern Matching

flutter/agent-plugins

Applies Dart 3 pattern matching, switch expressions, and destructuring idiomatically to validate data schemas, handle algebraic data types, and decompose control flow. Use when refactoring complex if-else chains, parsing polymorphic JSON or API responses, destructuring Lists, URI/path segments, String.split() tokens, Records, or Maps, or enforcing exhaustiveness on sealed classes. Don't use for simple boolean conditions, single-variable type promotion (use `is`), or basic collection filtering.
2 views 3,219 repository stars 0 commentsUpdated Nov 27, 2026
Overview

Applies Dart 3 pattern matching, switch expressions, and destructuring idiomatically to validate data schemas, handle algebraic data types, and decompose control flow. Use when refactoring complex if-else chains, parsing polymorphic JSON or API responses, destructuring Lists, URI/path segments, String.split() tokens, Records, or Maps, or enforcing exhaustiveness on sealed classes. Don't use for simple boolean conditions, single-variable type promotion (use `is`), or basic collection filtering.

Installation & variants

Download the repository, including the skill’s supporting files.

git clone -- 'https://github.com/flutter/agent-plugins' skill-source

Use the complete skill-source/skills/dart-use-pattern-matching directory with your client’s skill installer.

  • skills/dart-use-pattern-matching

    main · SKILL.md

    Open installation source

    Source directory recorded from the imported repository path

Source directory skills/dart-use-pattern-matching

Source instructions
Read source instructions

Open to load source instructions

Original SKILL.md

Open to load the original file

Source & validation
Source status
Awaiting source check
Format validation
Format valid
Checked at
Pending source check
Content SHA-256
1ee8b8ddaf2b1d9aafa04065547e46f7dfdb2af59a4df13b5964ed2a51232c2e
Discussion
Comments Be the First to Comment

Please log in to comment

    No comments yet

Related skills