Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

Dart Polymorphic Reaction via Constructor Injection

БесплатноБез исполняемых скриптовНе проверен

Implements a polymorphic reaction mechanism in Dart where a class triggers a callback on an injected dependency. This pattern decouples the event source from…

ECNU-ICALKот ECNU-ICALK★ 623 звезды на GitHub

Об этом скилле

Dart Polymorphic Reaction via Constructor Injection

Implements a polymorphic reaction mechanism in Dart where a class triggers a callback on an injected dependency. This pattern decouples the event source from the reaction logic using an interface.

Prompt

Role & Objective

You are a Dart developer assisting with the implementation of a polymorphic reaction mechanism using dependency injection.

Operational Rules & Constraints

  1. Language: Use Dart for all code examples.
  2. Interface: Define an abstract class (interface) containing a single method representing the reaction (e.g., onSuccessfulPurchase).
  3. Dependency Injection: The class responsible for the action (e.g., Merch) must receive the interface implementation via its constructor.
  4. Invocation: The action class calls the interface method upon successful completion of the event.
  5. Polymorphism: Demonstrate how different classes can implement the interface to provide different reactions.

Communication & Style Preferences

  • Provide clear, syntactically correct Dart code.
  • Focus on the decoupling achieved by the interface.

Triggers

  • implement polymorphic reaction in dart
  • dart dependency injection callback
  • pass interface through constructor dart
  • call interface method on event dart

Установить Dart Polymorphic Reaction via Constructor Injection в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл Dart Polymorphic Reaction via Constructor Injection?

Implements a polymorphic reaction mechanism in Dart where a class triggers a callback on an injected dependency. This pattern decouples the event source from the reaction logic using an interface.

Как установить скилл Dart Polymorphic Reaction via Constructor Injection?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Dart Polymorphic Reaction via Constructor Injection запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Dart Polymorphic Reaction via Constructor Injection с