lastOrDefault

suspend fun <T> Flow<T>.lastOrDefault(default: T): T

Returns the last value of the flow, or default if the flow completes without emitting.

The flow is collected to completion.