asInitialValueFlow

fun <T : Any> Flow<T>.asInitialValueFlow(initialValue: () -> T): InitialValueFlow<T>

Converts a Flow to an InitialValueFlow, taking an initialValue lambda for computing the initial value.