add method
Send an item to the subscriptions.
Implementation
@override
void add(T item) {
if (!hasListener) return;
if (_isSync) {
_sendItem(_subscriptions, item);
} else {
/// Only schedule a single micro-task for async streams.
if (_itemsToSend == null) {
_itemsToSend = [];
scheduleMicrotask(_sendAsync);
}
_itemsToSend!.add(item);
}
}