inline fun <reified R : Any> providerOrNull(qualifier: Any? = null, generics: Boolean = false): Provider<R>?
Retrieve an optional provider function that returns R
.
qualifier
- An optional qualifier of the dependency.
generics
- Preserves generic type parameters if set to true (default = false).
Return
The provider that returns R
or null if provider doesn't exist.