create Lazy View Model
open override fun <S : MavericksState, T : Fragment, MavericksView, VM : MavericksViewModel<S>> createLazyViewModel(fragment: T, viewModelProperty: KProperty<*>, viewModelClass: KClass<VM>, keyFactory: () -> String, stateClass: KClass<S>, existingViewModel: Boolean, viewModelProvider: (stateFactory: MavericksStateFactory<VM, S>) -> VM): Lazy<VM>
Content copied to clipboard
Create a Lazy ViewModel for the given Fragment.
Parameters
existing View Model
If true the view model is expected to already exist, so a new one should not need to be created.
view Model Provider
This function should be used to actually do the work of creating the viewmodel. It knows how to configure the viewmodel, and just needs to be provided with a state factory.