flow-lifecycle-observer
flow-lifecycle-observer copied to clipboard
A plugin for collecting Kotlin Flow in an Android Lifecycle-aware manner.
The problem with using `Flow` or `SharedFlow` as a replacement for `LiveData` with Jetpack Compose is that `Flow.collectAsState()` require to pass as argument the initial value of the `Flow`. `StateFlow.collectAsState()`...
I've found that most of the time in UI code you really want `collectLatest` rather than `collect`. If your UI code has gone away rendering a thumbnail or doing a...
Usually ongoing operations should not be interrupted due to rotation. Suggest to add a delay before cancelling the job like the androidx `livedata { }` builder. In their version they...