observeWhileViewAttached

open fun <T> Flow<T>.observeWhileViewAttached(action: FlowCollector<T>)

Collects the Flow using the given action while the current ViewController is attached to the Window.