collect Safe
Collect Flow without throwing an exception, except CancellationException to cancel parent jobs. Tries to emit a single value if Flow.collect can not be called.
Parameters
collector
the FlowCollector where you want to receive values.
Collect StateFlow without throwing an exception, except CancellationException to cancel parent jobs. Tries to emit a single value if StateFlow.collect can not be called.
Parameters
collector
the FlowCollector where you want to receive values.