forceGet<MInstance extends MvvmInstance> method
MInstance?
forceGet<MInstance extends MvvmInstance>({})
Forcibly tries to get instance for type
index
- index for this instance
scope
- string scope to get instance from
Implementation
@visibleForTesting
MInstance? forceGet<MInstance extends MvvmInstance>({
int? index,
String scope = BaseScopes.global,
}) {
return container.getObjectInScope(
type: MInstance.toString(),
scopeId: scope,
index: index ?? 0,
) as MInstance?;
}