subscribe method
Attaches a StreamSubscriber, which will be invoked when new items are available from the stream.
observer
The subscriber to attach.
Returns a subscription that can be disposed to terminate the stream and stop calling methods on the StreamSubscriber.
Implementation
@override
Subscription<T> subscribe(StreamSubscriber<T> observer) {
observers.add(observer);
return _SubjectSubscription(this, observer);
}