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
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
Tfrom the store. -
find<
T> () → T -
Finds and returns an existing dependency of type
Tfrom the store. -
put<
T> (T dependency) → T -
Adds a dependency of type
Tto the store. If a dependency of typeTalready exists, it will not be replaced.