Skip to content

Kotlin, MVVM, Navigation Component, Hilt, Jetpack Compose, Coroutine, MutableState, Retrofit2, Glide

Notifications You must be signed in to change notification settings

Ali1Assalem/MVVM-RecipeApp

Repository files navigation

MVVM-RecipeApp

Kotlin, MVVM, Navigation Component, Hilt, Jetpack Compose, Coroutine, MutableState, Retrofit2, Glide

Main Features

  1. Kotlin
  2. MVVM
  3. Jetpack Compose
  4. MutableState
    • Simpler than LiveData or Flow with respect to composables.
  5. Hilt
  6. Navigation Components
  7. Retrofit2
  8. Single Activity Architecture
  9. App Themes
  10. Custom Fonts
  11. Light and Dark theme
    • Toggle between themes

Compose features

  1. Snackbars
  2. Dialogs
  3. Theming
  4. Fonts
  5. Colors
  6. Animations introduction
    • creating a 'shimmering' loading animation
  7. ConstraintLayout
  8. Rows
  9. Columns
  10. Scaffold
  11. AppBar
  12. Circular Progress Indicator

Why not Flow or LiveData?

  1. LiveData
    • LiveData has always been a love/hate thing for me. It's great for some things but can be very annoying for others. For example you MUST have an observer for livedata to emit anything. Making it pretty useless in a repository or anywhere except viewmodel->view communication.
  2. Flow
    1. Flow is great. I use flows for my use cases when building out clean architecture. You don't need an "android observer" because flow lives in the coroutine world and there's even support for operators like RxJava has.
    2. Easily converted from livedata with a single function call.
    3. Tons of other useful properties. Check out the flow docs.
  3. StateFlow
    1. StateFlow is the newest addition to kotlinx.coroutines.flow. Simply put StateFlow is a flow with special properties.
    2. Originally I had planned to use StateFlow but it's really just totally unnecessary. I don't want to show you an unrealistic example of how to use something so I'm sticking with the very simple MutableState in viewmodels.




Author

@ALI

About

Kotlin, MVVM, Navigation Component, Hilt, Jetpack Compose, Coroutine, MutableState, Retrofit2, Glide

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages