Scope class

Mixed-in types

Constructors

Scope({required String id, required Koin koin, required ScopeDefinition scopeDefinition, dynamic source})

Properties

callbacks List<ScopeCallback>
getter/setter pair
closed bool
no setter
componentScope Scope
Get the associated Koin instance
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
id String
final
koin Koin
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scopeDefinition → ScopeDefinition
final
source → dynamic
final

Methods

bind<S, T>([Qualifier? qualifier]) → S
Get instance of primary type T and secondary type S (not for scoped instances)
override
bindWithParam<S, K, P>(P param, {Qualifier? qualifier}) → S
Get instance instance from Koin by Primary Type K, as secondary type S @param parameters
override
bindWithType<S>(Type primaryType, Type secondaryType, Parameter? parameter) → S
Get instance of primary type P and secondary type S (not for scoped instances)
clear() → void
close() → void
Close all instances from this scope
create(KtList<Scope> links) → void
createEagerInstances() → void
declare<T>(T instance, {Qualifier? qualifier, required List<Type> secondaryTypes, bool override = false}) → void
Declare a component definition from the given instance This result of declaring a scoped/single definition of type T, returning the given instance (single definition of th current scope is root)
disposeInstances(ScopeDefinition scopeDefinition) → void
findInOtherScope<T>(Type type, Qualifier? qualifier, Parameter? parameter) → T?
get<T>([Qualifier? qualifier]) → T
override
getAll<T>() List<T>
Get a all instance for given inferred class (in primary or secondary type)
getAllInstanceFactory<T>() → KtList<InstanceFactory>
Returns all InstanceFactory's scope.
getAllWithType<T>(Type type) List<T>
Get a all instance for given class (in primary or secondary type) @param clazz T
getFromSource<T>(Type type) → T?
getKoin() Koin
Get current Koin instance
getOrNull<T>([Qualifier? qualifier, Parameter? parameter]) → T?
Get a Koin instance if available @param qualifier @param scope @param parameters
getScope(String scopeID) Scope
Get Scope @param scopeID
getSource<T>() → T
getWithParam<T, P>(P parameter, {Qualifier? qualifier}) → T
override
getWithType<T>(Type type, Qualifier? qualifier, Parameter? parameter) → T
Get a Koin instance @param clazz @param qualifier @param parameters
getWithTypeOrNull<T>(Type type, Qualifier? qualifier, Parameter? parameter) → T?
Get a Koin instance if available @param qualifier @param scope @param parameters
linkTo(List<Scope> scopes) → void
Add parent Scopes to allow instance resolution i.e: linkTo(scopeC) - allow to resolve instance to current scope and scope.
loadDefinitions(ScopeDefinition scopeDefinition) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerCallback(ScopeCallback callback) → void
Register a callback for this Scope Instance
resolveInstance<T>(Type type, Qualifier? qualifier, Parameter? parameter) → T
toString() String
A string representation of this object.
override
Remove linked scope /

Operators

operator ==(Object other) bool
The equality operator.
inherited