DisposableModuleExtension extension
Introduces disposable
and scopeOneDisposable
keywords that comes in
complement of single and scoped,to help declare disposable component.
Facilitates the use of Koin with state management that depends on the flow controllers that need to be closed.
- on
-
- Module
Methods
-
disposable<
T extends Disposable> (ProviderCreate< T> create, {Qualifier? qualifier, bool createdAtStart = false, bool override = false}) → ProviderDefinition<T> -
Defines a
Disposable
as singlecreate
that will be automatically closed. -
scopeOneDisposable<
T extends Disposable, TScope> (ProviderCreate< T> create, {Qualifier? qualifier, bool createdAtStart = false, bool override = false}) → ProviderDefinition<T> -
Declare in a simplified way a scope that has
only one Bloc
definition
. Declare a Bloc scoped definitionT
for scopeTScope
. Declare and define a scoped with just one line.