https://kotlinlang.org logo
#android
Title
# android
s

Shreyas Patil

05/22/2020, 6:38 PM
i

Ian Lake

05/22/2020, 6:42 PM
FWIW, you should really consider using
by viewModels()
from
fragment-ktx
or
activity-ktx
than the
by lazy { ViewModelProvider(this) }
K 2
f

fada21

05/27/2020, 9:07 PM
Very interesting article. Sounds promising but my main concern is about modelling events. So
StateFlow
can capture state like
LiveData
but what to do when we have to handle events like described here for
LiveData
https://medium.com/androiddevelopers/livedata-with-snackbar-navigation-and-other-events-the-singleliveevent-case-ac2622673150. Is there a solution for any
Flow
to only collect once to active at that time collectors?
5 Views