cast

fun <R> Flow<*>.cast(): Flow<R>(source)

Casts the elements of the current Flow to the specified type R. The elements that cannot be cast to R will cause a ClassCastException.

Return

A new Flow containing the cast elements of type R.