lifecycle/extensions/src/main/java/androidx/lifecycle/ViewModelProviders.java
@NonNull
    @MainThread
    public static ViewModelProvider of(@NonNull Fragment fragment) {
        return of(fragment, null);
    }
/**
     * Creates a {@link ViewModelProvider}, which retains ViewModels while a scope of given
     * {@code fragment} is alive. More detailed explanation is in {@link ViewModel}.
     * <p>
     * It uses {@link ViewModelProvider.AndroidViewModelFactory} to instantiate new ViewModels.
     *
     * @param fragment a fragment, in whose scope ViewModels should be retained
     * @return a ViewModelProvider instance
     */
Creates a  ViewModelProvider, which retains ViewModels while a scope of given
fragment is alive. More detailed explanation is in  ViewModel.

@param fragment a fragment, in whose scope ViewModels should be retained
@return a ViewModelProvider instance
Creates a ViewModelProvider which retains ViewModels while a scope of given fragment is alive . More detailed explanation is in ViewModel . @param fragment a fragment in whose scope ViewModels should be retained @return a ViewModelProvider instance
@NonNull
    @MainThread
    public static ViewModelProvider of(@NonNull Fragment fragment) {
        return of(fragment, null);
    }
@ NonNull @ MainThread public static ViewModelProvider of ( @ NonNull Fragment fragment ) { return of ( fragment , null ) ; }
Creates a {@link ViewModelProvider}, which retains ViewModels while a scope of given
 {@code fragment} is alive.
Creates a { @link ViewModelProvider } which retains ViewModels while a scope of given { @code fragment } is alive .