library eventsource.src.proxy_sink; /// Just a simple [Sink] implementation that proxies the [add] and [close] /// methods. class ProxySink implements Sink { Function onAdd; Function onClose; ProxySink({this.onAdd, this.onClose}); @override void add(t) => onAdd(t); @override void close() => onClose(); }