calculateJitteredDelay method
Implementation
Duration calculateJitteredDelay(int retries, Duration baseDelay) {
final delay = baseDelay.inMilliseconds * pow(2, retries);
final jitter = Random().nextDouble() * delay;
return Duration(milliseconds: (delay + jitter).toInt());
}