activityViewModel

inline fun <T : ViewModel> Fragment.activityViewModel(crossinline provider: () -> T): Lazy<T>

Creates a ViewModel scoped to the Activity.

The provider should instantiate the ViewModel directly.

See also

if you want to create multiplatform ReactiveState ViewModels.