FlowWithInitialSample
@Composable
fun FlowWithInitialSample(flow: Flow<String>) {
val value: String by flow.collectAsState("initial")
Text("Value is $value")
}
StateFlowSample
@Composable
fun StateFlowSample(stateFlow: StateFlow<String>) {
val value: String by stateFlow.collectAsState()
Text("Value is $value")
}