Files
syncrow-app/lib/services/api/my_http_overrides.dart
Mohammad Salameh 80d424f114 Refactor code for consistency and readability
- Removed unused imports and commented-out code
- Updated class inheritance for AuthState subclasses
- Reorganized code structure for better readability
- Cleaned up debug print statements and replaced with dart:developer logs
2024-04-15 12:03:25 +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;
}
}