Files
syncrow-web/lib/services/api/my_http_overrides.dart
2024-07-21 12:55:13 +03:00

12 lines
383 B
Dart

import 'dart:io';
// We use this class to skip the problem of SSL certification and solve the Image.network(url) issue
class MyHttpOverrides extends HttpOverrides {
@override
HttpClient createHttpClient(SecurityContext? context) {
return super.createHttpClient(context)
..badCertificateCallback =
(X509Certificate cert, String host, int port) => true;
}
}