Skip to content

Clean MVVM with eliminating the usage of context from view models by introducing hilt for DI and sealed classes for displaying Errors in views using shared flows (one time event), and Stateflow for data

Notifications You must be signed in to change notification settings

Kashif-E/The-MVVM-Template-2022

Repository files navigation

Clean ViewModel with Sealed Classes

Following are the purposes of this repo

  1. Showing how you can remove the need of context in ViewModels.
    I. By using dependency injection and providing dependencies outside of viewModel.
    II. By using sealed classes to show error messages so you dont need context to get strings.

  2. To show how you can clean you Activity/Fragment by not observing/collecting livedata/flow that are not needed to be

  3. Basic MVVM with flow, stateflow, sharedflow

if this helps dont forget to star ⭐ ⭐ ⭐

Contact me on linkedin: Kashif Mehmood

About

Clean MVVM with eliminating the usage of context from view models by introducing hilt for DI and sealed classes for displaying Errors in views using shared flows (one time event), and Stateflow for data

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages