flush method
Retries all queued requests with the new token.
Implementation
void flush(Dio dio, String token) {
final pending = List.of(_queue);
_queue.clear();
for (final req in pending) {
retry(dio, req.options, token).then(
req.handler.resolve,
onError: (e) => req.handler.reject(e as DioException),
);
}
}