Package-level declarations

Types

Link copied to clipboard
@RequiresOptIn(message = "API marked as @KoinDelicateAPI. This API requires careful usage and understanding of its implications. Use with caution as improper usage may lead to unexpected behavior.", level = RequiresOptIn.Level.WARNING)
annotation class KoinDelicateAPI

Delicate APIs - APIs marked with @KoinDelicateAPI require careful usage and understanding of their implications. This designation indicates that:

Link copied to clipboard
@RequiresOptIn(message = "API marked as @KoinExperimentalAPI. The current API is actively under development, and may change or be removed without notice. Feedback will help stabilize this API.", level = RequiresOptIn.Level.WARNING)
annotation class KoinExperimentalAPI

Experimental APIs - To foster innovation while gathering valuable community feedback, we introduce new features and APIs under the @KoinExperimentalAPI annotation. This designation indicates that:

Link copied to clipboard
@RequiresOptIn(message = "API marked as @KoinInternalAPI and is intended for internal framework use only. It may change or be removed in future releases without notice. External usage is strongly discouraged.", level = RequiresOptIn.Level.ERROR)
annotation class KoinInternalApi

Internal APIs @KoinInternalAPI annotation. Tag APIs are not part of the public contract and:

Link copied to clipboard
@RequiresOptIn(message = "To use ViewModelScope for ViewModel's constructor injection, you need to declare your ViewModel inside a viewModelScope section, like viewModelScope { viewModel() }. Or use @ViewModelScope annotation with @KoinViewModel.", level = RequiresOptIn.Level.WARNING)
annotation class KoinViewModelScopeApi

ViewModelScope APIs - Create Scope for ViewModel, at ViewModel creation time To use ViewModelScope for ViewModel's constructor injection, you need to declare your ViewModel inside a viewModelScope section, like viewModelScope { viewModel() }. Or use @ViewModelScope annotation with @KoinViewModel. Else Koin won't find your instance in the right scope, if ViewModel is declared in root scope.