Join Slack
Powered by
Is there a way I can expose the latest element in ...
# coroutines
r
reactormonk
10/19/2022, 3:58 PM
Is there a way I can expose the latest element in a
Flow
to a non-suspend context? Collect to a
var
?
s
Sam
10/19/2022, 3:59 PM
Something like
stateIn
?
Sam
10/19/2022, 4:01 PM
That will return a
StateFlow
with a
value
property that contains the latest element
r
reactormonk
10/19/2022, 4:01 PM
Looks reasonable, thanks!
4
Views
Open in Slack
Previous
Next