NonFallbackInjectable
Mark a class that can be injected by a Injector and does not support fallback. It's implemented by ViewModel Factories when the ViewModel lifecycle is shorter than the activity that contains it. In those cases, they receive the Injector directly as a constructor parameter and should not be responsible for recreating the dependency graph.
See also
Functions
Link copied to clipboard
NonFallbackInjectable classes don't implement fallback because they receive the injector directly as a constructor parameter.
Extensions
Link copied to clipboard
fun <FallbackInitializeParam> Injectable<FallbackInitializeParam>.injectWithFallback(injectorKey: String?, fallbackInitializeParam: FallbackInitializeParam): Injector?
Try to use an InjectorKey to retrieve an Injector and inject, if no Injector is found, invoke Injectable.fallbackInitialize with fallbackInitializeParam.