Slide 16
Slide 16 text
viewModelsの中身
@MainThread
inline fun Fragment.viewModels(
noinline ownerProducer: () -> ViewModelStoreOwner = { this },
noinline factoryProducer: (() -> Factory)? = null
) = createViewModelLazy(VM::class, { ownerProducer().viewModelStore },
factoryProducer)
ViewModelのFactoryを指定する