mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-09 17:39:42 +00:00
fix(linter): Change httpClientAdapter callback creation
This commit is contained in:
parent
9ea952b46e
commit
371d83b4be
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue