bug fixed
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:camera/camera.dart';
|
||||
import 'package:cathaypay_mobile/Home/HomePage.dart';
|
||||
import 'package:cathaypay_mobile/Login/Login.dart';
|
||||
@@ -26,6 +28,7 @@ Future<void> main() async {
|
||||
Intl.defaultLocale = "th";
|
||||
initializeDateFormatting();
|
||||
CameraApp = await availableCameras();
|
||||
HttpOverrides.global = MyHttpOverrides();
|
||||
runApp(
|
||||
EasyLocalization(
|
||||
supportedLocales: [Locale('en'), Locale('th')],
|
||||
@@ -89,3 +92,10 @@ class MyApp extends StatelessWidget {
|
||||
extension E on String {
|
||||
String lastChars(int n) => substring(length - n);
|
||||
}
|
||||
class MyHttpOverrides extends HttpOverrides{
|
||||
@override
|
||||
HttpClient createHttpClient(SecurityContext? context){
|
||||
return super.createHttpClient(context)
|
||||
..badCertificateCallback = (X509Certificate cert, String host, int port)=> true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user