FlowToStateFlow

constructor(flow: Flow<T>, produceValue: () -> T)

Parameters

flow

The Flow that should be converted to a StateFlow

produceValue

The producer of the StateFlow's value