How can I convert a Dart Observable to a Future and vice-versa?
Asked
Active
Viewed 3,335 times
1 Answers
17
To convert a Observable to a Future:
myObservable.firstmyObservable.firstWhere
To convert a Future to an Observable:
Observable.fromFuture(myFuture)
Or into a simple stream:
myFuture.asStream()
Daniel Oliveira
- 8,053
- 11
- 40
- 76