How can I convert a Dart Observable
to a Future
and vice-versa?
To convert a Observable
to a Future
:
myObservable.first
myObservable.firstWhere
To convert a Future
to an Observable
:
Observable.fromFuture(myFuture)
Or into a simple stream:
myFuture.asStream()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With