InstancesModule class abstract
Class describing set of dependencies that need to be initialized if instance depending on this module is created
Example:
class TestModule extends InstancesModule {
@override
List<Connector> get dependencies => [
app.connectors.postInteractorConnector(),
app.connectors.postsInteractorConnector(),
];
@override
String get id => 'test';
}
class Modules {
static get test => TestModule();
}
@singleton
class StringWrapper extends BaseWrapper<Map<String, dynamic>?> {
@override
DependentMvvmInstanceConfiguration get configuration =>
DependentMvvmInstanceConfiguration(
modules: [
Modules.test,
],
);
}
Constructors
Properties
-
dependencies
→ List<
Connector> -
List of all dependencies required in this module
no setter
-
getAsyncLazyInstanceDelegate
↔ Future<
T> Function<T extends MvvmInstance>({int index}) -
getter/setter pair
-
getInstanceDelegate
↔ T Function<
T extends MvvmInstance>({int index}) -
getter/setter pair
-
getLazyInstanceDelegate
↔ T Function<
T extends MvvmInstance>({int index}) -
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique module id - this will be basically id of scope in DI container
no setter
-
parts
→ List<
PartConnector> -
List of all parts required in this module
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
useInstancePartDelegate
↔ T Function<
T extends BaseInstancePart< dynamic, MvvmInstance> >({int index}) -
getter/setter pair
Methods
-
getAsyncLazyLocalInstance<
T extends MvvmInstance> ({int index = 0}) → Future< T> - Returns connected instance
-
getLazyLocalInstance<
T extends MvvmInstance> ({int index = 0}) → T - Returns connected instance
-
getLocalInstance<
T extends MvvmInstance> ({int index = 0}) → T - Returns connected instance
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
scopedDependencies(
) → List< Connector> - Returns list of connectors for this module for eventual dependent instance
-
toString(
) → String -
A string representation of this object.
inherited
-
useInstancePart<
T extends BaseInstancePart< (dynamic, MvvmInstance> >{int index = 0}) → T - Returns connected part
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited