bug fixed

This commit is contained in:
nutchayut
2024-12-25 17:44:05 +07:00
parent f6b69c6c56
commit 5f810de336
30 changed files with 2686 additions and 2591 deletions

View File

@@ -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;
}
}