cancelAll method

void cancelAll([
  1. String reason = 'All tasks cancelled'
])

Cancel all tasks.

Implementation

void cancelAll([String reason = 'All tasks cancelled']) {
  for (final taskId in _tasks.keys.toList()) {
    cancel(taskId, reason);
  }
}