Files
syncrow-app/lib/services/api/my_http_overrides.dart
2024-02-17 16:27:27 +03:00

11 lines
373 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;
}
}