Files
syncrow-app/lib/api/my_http_overrides.dart
Mohammad Salameh 84e142a099 initial commit
2024-02-14 10:58:43 +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;
}
}