public override StreamSubscription <T> listen(Action <T> onData, Action <object, string> onError = null, Action onDone = null, bool cancelOnError = false) { //cancelOnError = cancelOnError; StreamSubscription <T> result = _onListen(_stream, cancelOnError); result.onData(onData); result.onError(onError); result.onDone(onDone); return(result); }
public override void onError(Action <object, string> handleError) { _source.onError(handleError); if (handleError == null) { _handleError = null; } else { _handleError = _zone .registerBinaryCallback((a, b) => { handleError(a, (string)b); return(null); }); } }