retry_bot 1.0.1 retry_bot: ^1.0.1 copied to clipboard
Dio interceptor Retry which makes retrying API Call When getting a timeout.
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:dio/dio.dart';
import 'package:retry_bot/retry_bot.dart';
void main() {
final dio = Dio();
final connectivity = Connectivity();
final request = DioConnectivityRequest(
connectivity: connectivity,
dio: dio,
);
final retryInterceptor = OnRetryConnection(
request: request,
);
dio.interceptors.add(retryInterceptor);
}