use of com.mindorks.framework.mvvm.ui.main.MainViewModel in project android-mvvm-architecture by MindorksOpenSource.
the class ActivityModule method provideMainViewModel.
@Provides
MainViewModel provideMainViewModel(DataManager dataManager, SchedulerProvider schedulerProvider) {
Supplier<MainViewModel> supplier = () -> new MainViewModel(dataManager, schedulerProvider);
ViewModelProviderFactory<MainViewModel> factory = new ViewModelProviderFactory<>(MainViewModel.class, supplier);
return new ViewModelProvider(activity, factory).get(MainViewModel.class);
}
Aggregations