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 //PAYFORT
var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails"; var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails";
var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse"; var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse";
var payFortEnvironment = FortEnvironment.production; // var payFortEnvironment = FortEnvironment.production;
var applePayMerchantId = "merchant.com.hmgwebservices"; // var applePayMerchantId = "merchant.com.hmgwebservices";
// var payFortEnvironment = FortEnvironment.test; var payFortEnvironment = FortEnvironment.test;
// var applePayMerchantId = "merchant.com.hmgwebservices.uat"; var applePayMerchantId = "merchant.com.hmgwebservices.uat";
class AppGlobal { class AppGlobal {
static var context; static var context;

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

@ -20,6 +20,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_html/flutter_html.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:webview_flutter/webview_flutter.dart';
class UserLoginAgreementPage extends StatefulWidget { class UserLoginAgreementPage extends StatefulWidget {
final String userAgreementText; final String userAgreementText;
@ -38,6 +39,38 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
late ToDoCountProviderModel toDoProvider; late ToDoCountProviderModel toDoProvider;
final authService = AuthProvider(); 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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
@ -49,14 +82,15 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
showNewAppBar: true, showNewAppBar: true,
isShowDecPage: false, isShowDecPage: false,
appBarTitle: TranslationBase.of(context).userAgreement, appBarTitle: TranslationBase.of(context).userAgreement,
body: Padding( body: WebViewWidget(controller: _controller),
padding: const EdgeInsets.all(8.0), // Padding(
child: SingleChildScrollView( // padding: const EdgeInsets.all(8.0),
child: Html( // child: SingleChildScrollView(child: WebViewWidget(controller: _controller)
data: widget.userAgreementText, // // Html(
), // // data: widget.userAgreementText,
), // // ),
), // ),
// ),
bottomSheet: Container( bottomSheet: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
@ -101,9 +135,11 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
child: CustomTextButton( child: CustomTextButton(
backgroundColor: CustomColors.green, backgroundColor: CustomColors.green,
elevation: 0, elevation: 0,
onPressed: () { onPressed: isPageLoaded
addUsageAgreement(); ? () {
}, addUsageAgreement();
}
: null,
child: Text(TranslationBase.of(context).acceptLbl.toUpperCase(), child: Text(TranslationBase.of(context).acceptLbl.toUpperCase(),
style: TextStyle( style: TextStyle(
fontSize: 18.0, fontSize: 18.0,
@ -123,14 +159,16 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
child: CustomTextButton( child: CustomTextButton(
backgroundColor: Color(0xffc5272d), backgroundColor: Color(0xffc5272d),
elevation: 0, elevation: 0,
onPressed: () { onPressed: isPageLoaded
Navigator.pushAndRemoveUntil( ? () {
context, Navigator.pushAndRemoveUntil(
FadePage( context,
page: LandingPage(), FadePage(
), page: LandingPage(),
(r) => false); ),
}, (r) => false);
}
: null,
child: Text(TranslationBase.of(context).declineLbl.toUpperCase(), style: TextStyle(fontSize: 18.0, color: Colors.white)), 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 LIVE
// static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT // 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 // static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS

Loading…
Cancel
Save