diff --git a/lib/config/config.dart b/lib/config/config.dart index 4386f96f..b73b0c16 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -22,9 +22,8 @@ var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:4422/'; // var BASE_URL = 'https://uat.hmgwebservices.com/'; -var BASE_URL = 'https://hmgwebservices.com/'; -// var BASE_URL = 'http://10.20.200.111:1010/'; -// var BASE_URL = 'https://uat.hmgwebservices.com/'; +// var BASE_URL = 'https://hmgwebservices.com/'; + var BASE_URL = 'http://10.20.200.111:1010/'; // var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; @@ -629,10 +628,10 @@ var CONVERT_PATIENT_TO_CASH = 'Services/Doctors.svc/REST/deActivateInsuranceComp //PAYFORT var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails"; var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse"; -var payFortEnvironment = FortEnvironment.production; -var applePayMerchantId = "merchant.com.hmgwebservices"; -// var payFortEnvironment = FortEnvironment.test; -// var applePayMerchantId = "merchant.com.hmgwebservices.uat"; +// var payFortEnvironment = FortEnvironment.production; +// var applePayMerchantId = "merchant.com.hmgwebservices"; +var payFortEnvironment = FortEnvironment.test; +var applePayMerchantId = "merchant.com.hmgwebservices.uat"; class AppGlobal { static var context; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index e9fa657e..d0d5ed1b 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -175,7 +175,7 @@ class BaseAppClient { // body['IdentificationNo'] = 1023854217; // body['MobileNo'] = "531940021"; //0560717232 - // body['PatientID'] = 1374756; //4609100 + // body['PatientID'] = 3300938; //4609100 // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 683ddc6d..f60e3bda 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -382,6 +382,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { setUserValues(value); Navigator.of(context).pushNamed(CONFIRM_LOGIN); } else { + GifLoaderDialogUtils.hideDialog(context); Navigator.of(context).pushNamed( WELCOME_LOGIN, ); diff --git a/lib/uitl/gif_loader_dialog_utils.dart b/lib/uitl/gif_loader_dialog_utils.dart index d95307de..4591c19f 100644 --- a/lib/uitl/gif_loader_dialog_utils.dart +++ b/lib/uitl/gif_loader_dialog_utils.dart @@ -3,15 +3,40 @@ import 'package:flutter/material.dart'; import '../widgets/Loader/gif_loader_container.dart'; class GifLoaderDialogUtils { + static bool _isLoadingVisible = false; + + static bool get isLoading => _isLoadingVisible; + static showMyDialog(BuildContext context) { - showDialog(context: context, builder: (cxt) => GifLoaderContainer()); + // showDialog(context: context, builder: (cxt) => GifLoaderContainer()); + WidgetsBinding.instance.addPostFrameCallback((_) { + _isLoadingVisible = true; + showDialog( + context: context, + barrierColor: Colors.black.withOpacity(0.5), + useRootNavigator: false, + builder: (BuildContext context) => GifLoaderContainer(), + ).then((value) { + _isLoadingVisible = false; + }); + }); } static hideDialog(BuildContext context) { try { - Navigator.of(context).pop(); + if (_isLoadingVisible) { + _isLoadingVisible = false; + Navigator.of(context).pop(); + } + _isLoadingVisible = false; + // Navigator.of(context, rootNavigator: true).canPop(); } catch (error) { - Future.delayed(Duration(milliseconds: 250)).then((value) => Navigator.of(context).canPop()); + // Future.delayed(Duration(milliseconds: 250)).then((value) => Navigator.of(context, rootNavigator: true).canPop()); + if (_isLoadingVisible) { + _isLoadingVisible = false; + Navigator.of(context).pop(); + } + _isLoadingVisible = false; } } } diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index c9fecbf9..c71b206b 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -40,9 +40,9 @@ class MyInAppBrowser extends InAppBrowser { // static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT - // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT + static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT - static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE + // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE // static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS