mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 09:45:22 +00:00
11 lines
373 B
Dart
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;
|
|
}
|
|
}
|