Called before each wait. attempt is the 1-based number of the retry about to be made.
attempt
typedef RetryCallback = void Function(int attempt, String reason, Duration delay);