Observable<T>.just constructor

Observable<T>.just(T data)

Creates an Observable that contains a single value

The value is emitted when the stream receives a listener.

Example

 new Observable.just(1).listen(print); // prints 1

Implementation

factory Observable.just(T data) =>
    new Observable<T>((new Stream<T>.fromIterable(<T>[data])));