Simple app to test Kotlin Channel
Channel
This app is to test Kotlin Channel. Channel is only one time event. If you use LiveData or StateFlow, when configuration changes the event shown again, so if you wanna show error snackbar, LiveData and StateFlow show it again when configuration changes. Channel is to rescue and easily send events to activity or fragments. So channel makes it easier to do business logic in viewmodels and send event to activity or fragment. So activity or fragment will not make decisions they only update UI as it is planned.
Screenshots:
Tech stack:
- Kotlin Coroutines
- Viewmodel
- Channel
- Flow
- ViewBinding