Connector class
Class containing instance type to connect to given instance
class PostViewModel extends BaseViewModel<PostView, PostViewState> {
@override
DependentMvvmInstanceConfiguration get configuration =>
DependentMvvmInstanceConfiguration(
dependencies: [
Connector(type: ShareInteractor),
Connector(type: PostInteractor, scope: BaseScopes.unique),
],
);
}
- Implementers
Constructors
Properties
- awaitInitialization → bool
-
This flag indicates that app creation process will await initialization of this instance.
Only matters for async singleton instances.
final
- count → int
-
Count of instances to be connected. Defaults to 1
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initializationOrder → int?
-
Initialization order for this instance.
Only matters for singletons with isAsync
and awaitInitialization set to true
final
- input → dynamic
-
Input for connected instance
final
- inputForIndex → dynamic Function(int)?
-
Same as input, but if count provided
allows to pass unique input to every instance
final
- isAsync → bool
-
Flag indicating that instance is async
final
- isLazy → bool
-
Flag indicating that this connector is lazy. If set to true instances
need to be obtained with DependentMvvmInstance.getLazyLocalInstance
and DependentMvvmInstance.getAsyncLazyLocalInstance instead of DependentMvvmInstance.getLocalInstance
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scope → String
-
Scope in whith instance should be obtained. Defaults to BaseScopes.weak.
final
- type → Type
-
Actual type of instance to connect
final
- withoutConnections → bool
-
Flag indicating that instance needs to be
connected without initalization of dependencies and event bus subscription
final
Methods
-
copyWithScope(
String scope) → Connector - Returns copy if this connector with overriden scope value
-
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