Module class abstract
- Inheritance
-
- Object
- ChangeNotifier
- EasyModule
- Module
- Annotations
-
- @Deprecated('Use EasyModule instead')
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
-
imports
→ List<
Type> -
List of other module types that this module depends on.
no setterinherited
- injector ↔ CustomAutoInjector?
-
The dependency injector for this module.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
dispose(
[void instanceCallback(dynamic)?]) → void -
Disposes of the module and its dependencies.
inherited
-
importsModule(
EasyModule module) → bool -
Checks if this module imports another module.
inherited
-
init(
) → Future< CustomAutoInjector> -
Initializes the module by creating an injector and registering dependencies.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
registerBinds(
InjectorRegister i) → FutureOr< void> -
Registers dependencies for this module using the provided InjectorRegister.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
reset(
[void instanceCallback(dynamic)?]) → Future< void> -
Resets the module by disposing of its dependencies and reinitializing it.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validateImports(
) → void -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
disposeSingleton<
T extends Object> (BuildContext context) → T? -
Disposes a specific singleton of type
T
from the module.override -
get<
T extends Object> (BuildContext context, {bool listen = false}) → T -
Gets a dependency of type
T
from the closest EasyModule in the widget tree. -
of(
BuildContext context, {bool listen = false}) → Module? -
Gets the current EasyModule instance from the widget tree.
override