shouldRetry method
Implementation
bool shouldRetry(NetworkException error, int attempt) =>
attempt < maxAttempts &&
(error is ConnectionException || error is TimeoutException);
bool shouldRetry(NetworkException error, int attempt) =>
attempt < maxAttempts &&
(error is ConnectionException || error is TimeoutException);