TransformerPlugin<CTX extends Context> class
abstract
Base class for plugins that only provide transformers.
This is a convenience base class for plugins that only need to add transformers to the bot's API. Subclasses need only implement the transformer getter.
Example:
class RetryPlugin<CTX extends Context> extends TransformerPlugin<CTX> {
@override
String get name => 'auto-retry';
@override
String get description => 'Automatically retries failed API calls';
@override
Transformer get transformer => RetryTransformer(maxRetries: 3);
}
- Implemented types
-
- BotPlugin<
CTX>
- BotPlugin<
- Implementers
Constructors
Properties
-
dependencies
→ List<
String> -
List of plugin names that this plugin depends on.
no setterinherited
- description → String?
-
Optional description of what this plugin does.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
The unique name of this plugin.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- transformer → Transformer
-
The transformer to install.
no setter
- version → String
-
The version of this plugin.
no setterinherited
Methods
-
install(
Bot< CTX> bot) → void -
Installs the plugin on the given bot.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
uninstall(
Bot< CTX> bot) → void -
Uninstalls the plugin from the given bot.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited