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