SwitchIfEmptyExtension<T> extension Null safety

Extend the Stream class with the ability to return an alternative Stream if the initial Stream completes with no items.



switchIfEmpty(Stream<T> fallbackStream) Stream<T>
When the original Stream emits no items, this operator subscribes to the given fallback stream and emits items from that Stream instead.