Closed flamyoad closed 3 years ago
Similarly, the
Flow.stateIn
andFlow.shareIn
operators can be configured with the sharing started policy for this.WhileSubscribed()
will stop the underlying producer when there are no active observers! On the contrary,Eagerly
orLazily
will keep the underlying producer active as long as theCoroutineScope
they use is active.
?????????
?!?
repeatOnLifecycle API design story (https://medium.com/androiddevelopers/repeatonlifecycle-api-design-story-8670d1a7d333)
A safer way to collect flows from Android UIs (https://medium.com/androiddevelopers/a-safer-way-to-collect-flows-from-android-uis-23080b1f8bda)