onStateSubscription

fun <T> MutableStateFlow<T>.onStateSubscription(block: suspend FlowCollector<T>.() -> Unit): MutableStateFlow<T>

Similar to MutableStateFlow.onSubscription but returns a MutableStateFlow.


fun <T> StateFlow<T>.onStateSubscription(block: suspend FlowCollector<T>.() -> Unit): StateFlow<T>

Similar to StateFlow.onSubscription but returns a StateFlow.