PowerVault class

The PowerVault class provides a way to store and retrieve dependencies (such as controllers or services) as singletons, allowing shared instances across an application.

Example usage:

PowerVault.put<MyController>(MyController());
final controller = PowerVault.find<MyController>();

Constructors

PowerVault()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

clear() → dynamic
Clears all stored dependencies from the store.
delete<T>() bool
Deletes an existing dependency of type T from the store.
find<T>() → T
Finds and returns an existing dependency of type T from the store.
put<T>(T dependency) → T
Adds a dependency of type T to the store. If a dependency of type T already exists, it will not be replaced.