Was macht dart-use-pattern-matching?
Nutze Switch-Ausdrücke und Pattern Matching, wo es sinnvoll ist.
Nutze Switch-Ausdrücke und Pattern Matching, wo es sinnvoll ist.
Diese Skill hilft Dart-Entwicklern, modernen und ausdrucksstärkeren Code zu schreiben, indem sie Switch-Ausdrücke und Pattern Matching anstelle traditioneller if-else-Ketten oder einfacher Switch-Anweisungen verwenden. Switch-Ausdrücke in Dart ermöglichen eine kompakte, wertrückgebende Syntax, während Pattern Matching das Entpacken von Datenstrukturen wie Records, Listen oder benutzerdefinierten Typen erlaubt. Die Skill ist für alle Dart- und Flutter-Projekte relevant, die auf Dart 3.0 oder höher basieren, und wird durch die integrierte Sprachunterstützung direkt in der Dart-Analyse oder über Linter-Regeln wirksam. Sie erkennt automatisch Stellen im Code, die durch Pattern Matching vereinfacht werden könnten, und schlägt entsprechende Refactorings vor, was zu lesbarerem, wartbarerem und weniger fehleranfälligem Code führt.
npx skills add https://github.com/dart-lang/skills/tree/main/skills/dart-use-pattern-matchingInstalled? Explore more Codierung & Entwicklung skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →
Nutze Switch-Ausdrücke und Pattern Matching, wo es sinnvoll ist.
This repo contains 8 individual skills — each has its own dedicated page.
Write and organize unit tests for functions, methods, and classes using `package:test`. Use when creating new logic or fixing bugs to ensure code remains correct and regression-free.
Entrypoint structure, exit codes, cross-platform scripts. Use when building command line utilities, scripts, or applications.
Collect coverage using the coverage packge and create an LCOV report
Uses get_runtime_errors and lsp to fetch an active stack trace, locate the failing line, apply a fix, and verify resolution via hot_reload.
Define and generate mock objects for external dependencies using `package:mockito` and `build_runner`. Use when unit testing classes that depend on complex external services like APIs or databases.
Replace the usage of `expect` and similar functions from `package:matcher` to `package:checks` equivalents.
Workflow for fixing package version conflicts. Use this when `pub get` fails due to incompatible package versions.
Execute `dart analyze` to identify warnings and errors, and use `dart fix --apply` to automatically resolve mechanical lint issues. Use during development to ensure code quality and before committing changes.
Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.
Control Eight Sleep pods (status, temperature, alarms, schedules).
BluOS CLI (blu) for discovery, playback, grouping, and volume.
Create, search, and manage Bear notes via grizzly CLI.
Capture frames or clips from RTSP/ONVIF cameras.
Search GIF providers with CLI/TUI, download results, and extract stills/sheets.