KodeinViewModelScopedFactory

class KodeinViewModelScopedFactory<A : Any>(di: DI, argType: TypeToken<A>, arg: A, tag: String? = null) : ViewModelProvider.Factory

Factory class for creating ViewModel instances using Kodein dependency injection.

Parameters

A

The type of argument to be passed to the ViewModel constructor.

Constructors

Link copied to clipboard
constructor(di: DI, argType: TypeToken<A>, arg: A, tag: String? = null)

Functions

Link copied to clipboard
open override fun <T : ViewModel> create(modelClass: KClass<T>, extras: CreationExtras): T