PluginRegistry class
Registry that manages plugin instances.
Plugins are passed pre-configured and attached lazily when accessed through the controller.
Usage
final registry = PluginRegistry([
MinimapPlugin(visible: true),
LodPlugin(),
StatsPlugin(),
]);
// Get by type
final minimap = registry.get<MinimapPlugin>();
Constructors
-
PluginRegistry([List<
NodeFlowPlugin> ? plugins]) - Creates a registry with the given plugins.
Properties
-
all
→ Iterable<
NodeFlowPlugin> -
Gets all plugin instances.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
ids
→ Iterable<
String> -
Gets all registered plugin IDs.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clear(
) → void - Clears all plugins.
-
get<
E extends NodeFlowPlugin> () → E? - Gets a plugin by type.
-
getById(
String id) → NodeFlowPlugin? - Gets a plugin by its ID.
-
has(
String id) → bool - Checks if a plugin is registered for the given ID.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
register(
NodeFlowPlugin plugin) → void - Registers a plugin.
-
remove(
String id) → void - Removes a plugin by ID.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited