nextDelay method
Start with the initialDelay, and then increase it by multiplier each time this is called. If the delay exceeds maxDelay, it will be set to maxDelay.
Implementation
Duration nextDelay() {
var _multiplier = multiplier;
if (_multiplier <= 1) _multiplier = 2;
_currentDelay = (_currentDelay == null) //
? initialDelay //
: _currentDelay! * _multiplier;
if (_currentDelay! > maxDelay) _currentDelay = maxDelay;
return _currentDelay!;
}