dematerialize<S> method

Observable<S> dematerialize<S>()

Converts the onData, onDone, and onError Notification objects from a materialized stream into normal onData, onDone, and onError events.

When a stream has been materialized, it emits onData, onDone, and onError events as Notification objects. Dematerialize simply reverses this by transforming Notification objects back to a normal stream of events.


new Observable<Notification<int>>
    .fromIterable([new Notification.onData(1), new Notification.onDone()])
    .listen((i) => print(i)); // Prints 1

Error example

new Observable<Notification<int>>
    .just(new Notification.onError(new Exception(), null))
    .listen(null, onError: (e, s) { print(e) }); // Prints Exception


Observable<S> dematerialize<S>() {
  return cast<Notification<S>>()