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★ 623 звезды на GitHub
Установить Dart Polymorphic Reaction via Constructor Injection в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
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
- Language: Use Dart for all code examples.
- Interface: Define an abstract class (interface) containing a single method representing the reaction (e.g.,
onSuccessfulPurchase). - Dependency Injection: The class responsible for the action (e.g.,
Merch) must receive the interface implementation via its constructor. - Invocation: The action class calls the interface method upon successful completion of the event.
- 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
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
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), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…