ViewModelInitializer



Holds a ViewModel class and initializer for that class

Summary

Public constructors

<T : ViewModel> ViewModelInitializer(clazz: Class<T>, initializer: CreationExtras.() -> T)

Construct a new ViewModelInitializer instance.

android
<T : ViewModel> ViewModelInitializer(clazz: KClass<T>, initializer: CreationExtras.() -> T)
Cmn
android
N

Public constructors

ViewModelInitializer

<T : ViewModel> ViewModelInitializer(clazz: Class<T>, initializer: CreationExtras.() -> T)

Construct a new ViewModelInitializer instance.

Parameters
clazz: Class<T>

ViewModel class with which the specified initializer is to be associated.

initializer: CreationExtras.() -> T

factory lambda to be associated with the specified ViewModel class.

ViewModelInitializer

<T : ViewModel> ViewModelInitializer(clazz: KClass<T>, initializer: CreationExtras.() -> T)