forward method
void
forward(
- ProgressNotification n
Sends n to the client with a progress value that only grows; a no-op without a client token or sender.
Implementation
void forward(ProgressNotification n) {
final raw = send;
final tok = token;
if (raw == null || tok == null) return;
_lastProgress = math.max(n.progress, _lastProgress + 1);
_lastSentAtMs = clock.elapsedMilliseconds;
try {
raw(ProgressNotification(progressToken: tok, progress: _lastProgress, total: n.total, message: n.message));
} on Object {
return;
}
}