merge-update-with-lab-changes
haroon amjad 1 year ago
parent e0de0768b6
commit 0e73d6d23e

@ -697,10 +697,10 @@ var GET_PATIENT_OCCUPATION_LIST = 'Services/Authentication.svc/REST/GetPatientOc
//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;

@ -187,7 +187,7 @@ class BaseAppClient {
// body['IdentificationNo'] = 1023854217;
// body['MobileNo'] = "531940021"; //0560717232
// body['PatientID'] = 1231755; //4609100
// body['PatientID'] = 1058229; //4609100
// body['TokenID'] = "@dm!n";
// Patient ID: 3027574

@ -20,6 +20,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:provider/provider.dart';
import 'package:webview_flutter/webview_flutter.dart';
class UserLoginAgreementPage extends StatefulWidget {
final String userAgreementText;
@ -38,6 +39,38 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
late ToDoCountProviderModel toDoProvider;
final authService = AuthProvider();
late final WebViewController _controller;
bool isPageLoaded = false;
@override
void initState() {
super.initState();
_controller = WebViewController()
..setJavaScriptMode(JavaScriptMode.unrestricted)
..setNavigationDelegate(
NavigationDelegate(
onProgress: (int progress) {
// Update loading bar.
},
onPageStarted: (String url) {},
onPageFinished: (String url) {
setState(() {
isPageLoaded = true;
});
},
onHttpError: (HttpResponseError error) {},
onWebResourceError: (WebResourceError error) {},
onNavigationRequest: (NavigationRequest request) {
if (request.url.startsWith('https://www.youtube.com/')) {
return NavigationDecision.prevent;
}
return NavigationDecision.navigate;
},
),
)
..loadRequest(Uri.parse("https://hmg.com/en/Pages/Privacy.aspx"));
}
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
@ -49,14 +82,15 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
showNewAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).userAgreement,
body: Padding(
padding: const EdgeInsets.all(8.0),
child: SingleChildScrollView(
child: Html(
data: widget.userAgreementText,
),
),
),
body: WebViewWidget(controller: _controller),
// Padding(
// padding: const EdgeInsets.all(8.0),
// child: SingleChildScrollView(child: WebViewWidget(controller: _controller)
// // Html(
// // data: widget.userAgreementText,
// // ),
// ),
// ),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
@ -101,9 +135,11 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
child: CustomTextButton(
backgroundColor: CustomColors.green,
elevation: 0,
onPressed: () {
addUsageAgreement();
},
onPressed: isPageLoaded
? () {
addUsageAgreement();
}
: null,
child: Text(TranslationBase.of(context).acceptLbl.toUpperCase(),
style: TextStyle(
fontSize: 18.0,
@ -123,14 +159,16 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
child: CustomTextButton(
backgroundColor: Color(0xffc5272d),
elevation: 0,
onPressed: () {
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: LandingPage(),
),
(r) => false);
},
onPressed: isPageLoaded
? () {
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: LandingPage(),
),
(r) => false);
}
: null,
child: Text(TranslationBase.of(context).declineLbl.toUpperCase(), style: TextStyle(fontSize: 18.0, color: Colors.white)),
),
),

@ -38,9 +38,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/PayFortWebL/ive/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

Loading…
Cancel
Save