Software Development
Dart Use Pattern Matching
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.
- Publisher / source
- flutter/agent-plugins (found on skills.sh)
- Upstream record
- flutter/agent-plugins
- Version
- Version 2
- Published
- Publication review
- Approved for publication · recorded passed scan 2026-11-02
- Content fingerprint
503d31e7bc08c26976d68c7569e72b4206bf57d54e443813063540b6eb0f8df5