parentFragmentViewModel

inline fun <T : Fragment, MavericksView, VM : MavericksViewModel<S>, S : MavericksState> T.parentFragmentViewModel(viewModelClass: KClass<VM> = VM::class, crossinline keyFactory: () -> String = { viewModelClass.java.name }): MavericksDelegateProvider<T, VM>

Gets or creates a ViewModel scoped to a parent fragment. This delegate will walk up the parentFragment hierarchy until it finds a Fragment that can provide the correct ViewModel. If no parent fragments can provide the ViewModel, a new one will be created in top-most parent Fragment.