Called before a retry sleeps: the error behind the failed attempt and the delay chosen.
attempt
delay
typedef RetryNotifier = void Function(Object error, int attempt, Duration delay);