mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
12 lines
383 B
Dart
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;
|
|
}
|
|
}
|