pushToStream method
Pushes data into the internal stream and triggers.
Implementation
@nonVirtual
@mustCallSuper
void pushToStream(TData data) {
if (_streamController == null || _streamController?.isClosed == true) {
return;
}
if (shouldAdd(data)) {
_streamController!.add(data);
final completed = _initialDataCompleter?.isCompleted ?? false;
if (!completed) {
_initialDataCompleter?.complete(data);
}
provideOnPushToStreamListeners().forEach((e) => e(data));
}
}