fix(linter): Change httpClientAdapter callback creation

This commit is contained in:
NaiJi 2023-12-20 17:04:33 +04:00
parent 9ea952b46e
commit 371d83b4be

View file

@ -15,10 +15,15 @@ abstract class RestApiMap {
dio.interceptors.add(PrettyDioLogger()); dio.interceptors.add(PrettyDioLogger());
} }
dio.interceptors.add(ConsoleInterceptor()); dio.interceptors.add(ConsoleInterceptor());
final adapter = dio.httpClientAdapter as IOHttpClientAdapter; dio.httpClientAdapter = IOHttpClientAdapter(
final client = adapter.createHttpClient!(); createHttpClient: () {
final client = HttpClient();
client.badCertificateCallback = client.badCertificateCallback =
(final X509Certificate cert, final String host, final int port) => true; (final X509Certificate cert, final String host, final int port) =>
true;
return client;
},
);
dio.interceptors.add( dio.interceptors.add(
InterceptorsWrapper( InterceptorsWrapper(