Merge branch 'refs/heads/dev_v3.13.6_PenguinIn_3.24-IOS' into dev_v3.13.6_PenguinIn

merge-update-with-lab-changes
Aamir.Muhammad 1 year ago
commit 3aaaf3c01c

@ -0,0 +1,47 @@
{
"project_info": {
"project_number": "815750722565",
"firebase_url": "https://api-project-815750722565.firebaseio.com",
"project_id": "api-project-815750722565",
"storage_bucket": "api-project-815750722565.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:815750722565:android:62281cd3e5df4063",
"android_client_info": {
"package_name": "com.ejada.hmg"
}
},
"oauth_client": [
{
"client_id": "815750722565-3a0gc7neins0eoahdrimrfksk0sqice8.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDUfg6AKM1-00WyzpvLImUBC46wFrq9-qw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "815750722565-3a0gc7neins0eoahdrimrfksk0sqice8.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "815750722565-0cq9366orvsk5ipivq6lijcj56u03fr7.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.void.demo"
}
}
]
}
}
}
],
"configuration_version": "1"
}

@ -33,7 +33,7 @@ target 'Runner' do
pod 'OpenTok', '~> 2.22.0' pod 'OpenTok', '~> 2.22.0'
pod 'VTO2Lib' pod 'VTO2Lib'
pod 'MapboxMaps', '10.16.4' pod 'MapboxMaps', '10.18.2'
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end end
@ -64,6 +64,17 @@ post_install do |installer|
if build_configuration.build_settings['WRAPPER_EXTENSION'] == 'bundle' if build_configuration.build_settings['WRAPPER_EXTENSION'] == 'bundle'
build_configuration.build_settings['DEVELOPMENT_TEAM'] = '3A359E86ZF' build_configuration.build_settings['DEVELOPMENT_TEAM'] = '3A359E86ZF'
end end
if target.name == 'MapboxMobileEvents'
`xcrun -sdk iphoneos bitcode_strip -r Pods/MapboxMobileEvents/MapboxMobileEvents.xcframework/ios-arm64_armv7/MapboxMobileEvents.framework/MapboxMobileEvents -o Pods/MapboxMobileEvents/MapboxMobileEvents.xcframework/ios-arm64_armv7/MapboxMobileEvents.framework/MapboxMobileEvents`
end
if target.name == 'MapboxCommon'
`xcrun -sdk iphoneos bitcode_strip -r Pods/MapboxCommon/MapboxCommon.xcframework/ios-arm64/MapboxCommon.framework/MapboxCommon -o Pods/MapboxCommon/MapboxCommon.xcframework/ios-arm64/MapboxCommon.framework/MapboxCommon`
end
if target.name == 'MapboxCoreMaps'
`xcrun -sdk iphoneos bitcode_strip -r Pods/MapboxCoreMaps/MapboxCoreMaps.xcframework/ios-arm64/MapboxCoreMaps.framework/MapboxCoreMaps -o Pods/MapboxCoreMaps/MapboxCoreMaps.xcframework/ios-arm64/MapboxCoreMaps.framework/MapboxCoreMaps`
end
end end
end end
end end

@ -318,7 +318,7 @@
97C146E61CF9000F007C117D /* Project object */ = { 97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastUpgradeCheck = 1430; LastUpgradeCheck = 1510;
ORGANIZATIONNAME = ""; ORGANIZATIONNAME = "";
TargetAttributes = { TargetAttributes = {
97C146ED1CF9000F007C117D = { 97C146ED1CF9000F007C117D = {
@ -578,6 +578,7 @@
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
@ -599,7 +600,7 @@
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
MARKETING_VERSION = 4.5.93; MARKETING_VERSION = 4.5.95;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
@ -728,6 +729,7 @@
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
@ -749,7 +751,7 @@
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
MARKETING_VERSION = 4.5.93; MARKETING_VERSION = 4.5.95;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
@ -770,6 +772,7 @@
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
@ -791,7 +794,7 @@
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
MARKETING_VERSION = 4.5.93; MARKETING_VERSION = 4.5.95;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "1430" LastUpgradeVersion = "1510"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"

@ -4,7 +4,7 @@ import GoogleMaps
var userNotificationCenterDelegate:UNUserNotificationCenterDelegate? = nil var userNotificationCenterDelegate:UNUserNotificationCenterDelegate? = nil
@UIApplicationMain @main
@objc class AppDelegate: FlutterAppDelegate { @objc class AppDelegate: FlutterAppDelegate {
let locationManager = CLLocationManager() let locationManager = CLLocationManager()
var flutterViewController:MainFlutterVC! var flutterViewController:MainFlutterVC!

@ -33,7 +33,7 @@ var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'http://10.50.100.198:4422/'; // var BASE_URL = 'http://10.50.100.198:4422/';
// Pharmacy UAT URLs // Pharmacy UAT URLs`
// var BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; // var BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// var PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; // var PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
@ -344,7 +344,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari
var CHANNEL = 3; var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958'; var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20'; var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 15.9; var VERSION_ID = 16.3;
var SETUP_ID = '91877'; var SETUP_ID = '91877';
var LANGUAGE = 2; var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0; // var PATIENT_OUT_SA = 0;
@ -668,10 +668,10 @@ var GET_DENTAL_INSTRUCTIONS = 'Services/OUTPs.svc/Rest/getProcedureNotification'
//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;

@ -1977,4 +1977,5 @@ const Map localizedValues = {
"wecare": {"en": "We Care", "ar": "نحن نهتم"}, "wecare": {"en": "We Care", "ar": "نحن نهتم"},
"myinstructions": {"en": "My Instructions", "ar": "تعليماتي"}, "myinstructions": {"en": "My Instructions", "ar": "تعليماتي"},
"clinicLocation": {"en": "Clinic Location", "ar": "موقع العيادة"}, "clinicLocation": {"en": "Clinic Location", "ar": "موقع العيادة"},
"searchClinic": {"en": "Search Clinic", "ar": "بحث العيادة"},
}; };

@ -30,7 +30,7 @@ class ProjectViewModel extends BaseViewModel {
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
Locale _appLocale = Locale('ar'); Locale _appLocale = Locale('ar');
String currentLanguage = 'ar'; String currentLanguage = 'ar';
bool _isArabic = false; bool _isArabic = true;
bool isInternetConnection = true; bool isInternetConnection = true;
bool isLoading = false; bool isLoading = false;
bool isError = false; bool isError = false;

@ -41,6 +41,7 @@ class DoctorList {
dynamic serviceID; dynamic serviceID;
String? setupID; String? setupID;
List<String>? speciality; List<String>? speciality;
List<String>? specialityN;
dynamic workingHours; dynamic workingHours;
dynamic decimalDoctorRate; dynamic decimalDoctorRate;
@ -87,6 +88,7 @@ class DoctorList {
this.serviceID, this.serviceID,
this.setupID, this.setupID,
this.speciality, this.speciality,
this.specialityN,
this.workingHours, this.workingHours,
this.decimalDoctorRate}); this.decimalDoctorRate});
@ -133,6 +135,7 @@ class DoctorList {
serviceID = json['ServiceID']; serviceID = json['ServiceID'];
setupID = json['SetupID']; setupID = json['SetupID'];
if (json.containsKey('Speciality') && json['Speciality'] != null) speciality = json['Speciality'].cast<String>(); if (json.containsKey('Speciality') && json['Speciality'] != null) speciality = json['Speciality'].cast<String>();
if (json.containsKey('SpecialityN') && json['SpecialityN'] != null) specialityN = json['SpecialityN'].cast<String>();
workingHours = json['WorkingHours']; workingHours = json['WorkingHours'];
decimalDoctorRate = json['DecimalDoctorRate']; decimalDoctorRate = json['DecimalDoctorRate'];
} }
@ -180,6 +183,7 @@ class DoctorList {
data['ServiceID'] = this.serviceID; data['ServiceID'] = this.serviceID;
data['SetupID'] = this.setupID; data['SetupID'] = this.setupID;
data['Speciality'] = this.speciality; data['Speciality'] = this.speciality;
data['SpecialityN'] = this.specialityN;
data['WorkingHours'] = this.workingHours; data['WorkingHours'] = this.workingHours;
data['DecimalDoctorRate'] = this.decimalDoctorRate; data['DecimalDoctorRate'] = this.decimalDoctorRate;
return data; return data;

@ -24,6 +24,8 @@ class GetERAppointmentFeesList {
String? companyName; String? companyName;
bool? isInsured; bool? isInsured;
bool? isShowInsuranceUpdateModule; bool? isShowInsuranceUpdateModule;
bool? isCash;
bool? isEligible;
String? tax; String? tax;
String? total; String? total;
String? currency; String? currency;
@ -41,6 +43,8 @@ class GetERAppointmentFeesList {
amount = json['Amount']; amount = json['Amount'];
companyName = json['CompanyName']; companyName = json['CompanyName'];
isInsured = json['IsInsured']; isInsured = json['IsInsured'];
isCash = json['IsCash'];
isEligible = json['IsEligible'];
isShowInsuranceUpdateModule = json['IsShowInsuranceUpdateModule']; isShowInsuranceUpdateModule = json['IsShowInsuranceUpdateModule'];
tax = json['Tax']; tax = json['Tax'];
total = json['Total']; total = json['Total'];

@ -100,7 +100,7 @@ class ConfirmDialog extends StatelessWidget {
onClick(); onClick();
Navigator.pop(context); Navigator.pop(context);
}, },
textColor: Theme.of(context).backgroundColor), textColor: CustomColors.white),
), ),
], ],
), ),

@ -6,6 +6,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/check_activation_code_for_e_referral_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/check_activation_code_for_e_referral_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -367,11 +368,11 @@ class _EReferralConfirmSMSDialogState extends State<EReferralConfirmSMSDialog> {
), ),
errorBorder: OutlineInputBorder( errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(5.0)), borderRadius: BorderRadius.all(Radius.circular(5.0)),
borderSide: BorderSide(color: Theme.of(context).errorColor), borderSide: BorderSide(color: CustomColors.accentColor),
), ),
focusedErrorBorder: OutlineInputBorder( focusedErrorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(5.0)), borderRadius: BorderRadius.all(Radius.circular(5.0)),
borderSide: BorderSide(color: Theme.of(context).errorColor), borderSide: BorderSide(color: CustomColors.accentColor),
), ),
); );
} }

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -36,9 +37,7 @@ class HomeHealthCareIndexPage extends StatelessWidget {
SizedBox( SizedBox(
height: 22, height: 22,
), ),
Center( Center(child: Image.asset('assets/images/AlHabibMedicalService/Wifi-AR.png')),
child: Image.asset(
'assets/images/AlHabibMedicalService/Wifi-AR.png')),
SizedBox( SizedBox(
height: 77, height: 77,
), ),
@ -53,13 +52,13 @@ class HomeHealthCareIndexPage extends StatelessWidget {
width: MediaQuery.of(context).size.width * 0.9, width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton( child: SecondaryButton(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
FadePage( FadePage(
page: HomeHealthCarePage(), page: HomeHealthCarePage(),
), ),
), ),
label: TranslationBase.of(context).loginRegister, label: TranslationBase.of(context).loginRegister,
textColor: Theme.of(context).backgroundColor), textColor: CustomColors.white),
), ),
], ],
), ),

@ -669,6 +669,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async { onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.toString()}"); log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString()); AppToast.showErrorToast(message: failureResult.toString());
}, },

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h2o_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h2o_page.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -57,9 +58,7 @@ class H2OPageIndexPage extends StatelessWidget {
onTap: () => onTap: () =>
Navigator.push(context, FadePage(page: H2OPage())), Navigator.push(context, FadePage(page: H2OPage())),
label: "Water Tracker", label: "Water Tracker",
textColor: Theme textColor: CustomColors.white),
.of(context)
.backgroundColor),
), ),
], ],
), ),

@ -4,31 +4,57 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart'; import 'package:webview_flutter/webview_flutter.dart';
class MyWebView extends StatelessWidget { class MyWebView extends StatefulWidget {
final String title; final String title;
final String selectedUrl; final String selectedUrl;
final Completer<WebViewController> _controller = Completer<WebViewController>();
MyWebView({ MyWebView({
required this.title, required this.title,
required this.selectedUrl, required this.selectedUrl,
}); });
@override @override
Widget build(BuildContext context) { State<MyWebView> createState() => _MyWebViewState();
return AppScaffold( }
isShowAppBar: true,
appBarTitle: title, class _MyWebViewState extends State<MyWebView> {
isShowDecPage: false, // final Completer<WebViewController> _controller = Completer<WebViewController>();
showNewAppBar: true, late final WebViewController _controller;
showNewAppBarTitle: true,
body: WebView( @override
initialUrl: selectedUrl, void initState() {
javascriptMode: JavascriptMode.unrestricted, super.initState();
onWebViewCreated: (WebViewController webViewController) { _controller = WebViewController()
_controller.complete(webViewController); ..setJavaScriptMode(JavaScriptMode.unrestricted)
..setNavigationDelegate(
NavigationDelegate(
onProgress: (int progress) {
// Update loading bar.
}, },
)); onPageStarted: (String url) {},
onPageFinished: (String url) {},
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(widget.selectedUrl));
}
@override
Widget build(BuildContext context) {
return AppScaffold(isShowAppBar: true, appBarTitle: widget.title, isShowDecPage: false, showNewAppBar: true, showNewAppBarTitle: true, body: WebViewWidget(controller: _controller)
// WebView(
// initialUrl: widget.selectedUrl,
// javascriptMode: JavascriptMode.unrestricted,
// onWebViewCreated: (WebViewController webViewController) {
// _controller.complete(webViewController);
// },
);
} }
} }

@ -290,7 +290,6 @@ class ConfirmPaymentPage extends StatelessWidget {
GifLoaderDialogUtils.showMyDialog(AppGlobal.context); GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, AppGlobal.context).then((res) { service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, AppGlobal.context).then((res) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context);
print(res);
navigateToHome(AppGlobal.context); navigateToHome(AppGlobal.context);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context);

@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobi
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
@ -350,11 +351,11 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
), ),
errorBorder: OutlineInputBorder( errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(5.0)), borderRadius: BorderRadius.all(Radius.circular(5.0)),
borderSide: BorderSide(color: Theme.of(context).errorColor), borderSide: BorderSide(color: CustomColors.accentColor),
), ),
focusedErrorBorder: OutlineInputBorder( focusedErrorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(5.0)), borderRadius: BorderRadius.all(Radius.circular(5.0)),
borderSide: BorderSide(color: Theme.of(context).errorColor), borderSide: BorderSide(color: CustomColors.accentColor),
), ),
); );
} }

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
@ -183,7 +184,8 @@ class _NewTextFieldsState extends State<NewTextFields> {
validator: widget.validator, validator: widget.validator,
onSaved: widget.onSaved, onSaved: widget.onSaved,
style: Theme.of(context).textTheme.bodyText2!.copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight), // style: Theme.of(context).textTheme.bodyText2!.copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight),
style: TextStyle(color: Colors.black, letterSpacing: 0.6, fontSize: widget.fontSize, fontWeight: widget.fontWeight),
inputFormatters: widget.keyboardType == TextInputType.phone inputFormatters: widget.keyboardType == TextInputType.phone
? <TextInputFormatter>[ ? <TextInputFormatter>[
FilteringTextInputFormatter.digitsOnly, FilteringTextInputFormatter.digitsOnly,
@ -193,8 +195,8 @@ class _NewTextFieldsState extends State<NewTextFields> {
decoration: InputDecoration( decoration: InputDecoration(
labelText: widget.hintText, labelText: widget.hintText,
labelStyle: TextStyle(color: Colors.black), labelStyle: TextStyle(color: Colors.black),
errorBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).errorColor.withOpacity(0.5), width: 1.0), borderRadius: BorderRadius.circular(12.0)), errorBorder: OutlineInputBorder(borderSide: BorderSide(color: CustomColors.accentColor.withOpacity(0.5), width: 1.0), borderRadius: BorderRadius.circular(12.0)),
focusedErrorBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).errorColor.withOpacity(0.5), width: 1.0), borderRadius: BorderRadius.circular(8.0)), focusedErrorBorder: OutlineInputBorder(borderSide: BorderSide(color: CustomColors.accentColor.withOpacity(0.5), width: 1.0), borderRadius: BorderRadius.circular(8.0)),
focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Colors.white, width: 1.0), borderRadius: BorderRadius.circular(12)), focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Colors.white, width: 1.0), borderRadius: BorderRadius.circular(12)),
disabledBorder: OutlineInputBorder(borderSide: BorderSide(color: Colors.white, width: 1.0), borderRadius: BorderRadius.circular(12)), disabledBorder: OutlineInputBorder(borderSide: BorderSide(color: Colors.white, width: 1.0), borderRadius: BorderRadius.circular(12)),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(

@ -316,6 +316,7 @@ class _BookConfirmState extends State<BookConfirm> {
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}); });
} }

@ -711,6 +711,7 @@ class _BookSuccessState extends State<BookSuccess> {
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async { onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.toString()}"); log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString()); AppToast.showErrorToast(message: failureResult.toString());
}, },

@ -1,6 +1,8 @@
import "dart:collection"; import "dart:collection";
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
@ -73,7 +75,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
super.initState(); super.initState();
} }
void checkPVM(){ void checkPVM() {
if (context.read<ProjectViewModel>().isLogin) { if (context.read<ProjectViewModel>().isLogin) {
if (radioValue == null) { if (radioValue == null) {
if (context.read<ProjectViewModel>().user.gender == 1) { if (context.read<ProjectViewModel>().user.gender == 1) {
@ -89,7 +91,6 @@ class _SearchByClinicState extends State<SearchByClinic> {
ageController.text = context.read<ProjectViewModel>().isLogin ? context.read<ProjectViewModel>().user!.age.toString() : ""; ageController.text = context.read<ProjectViewModel>().isLogin ? context.read<ProjectViewModel>().user!.age.toString() : "";
ageController.selection = TextSelection.fromPosition(TextPosition(offset: ageController.text.length)); ageController.selection = TextSelection.fromPosition(TextPosition(offset: ageController.text.length));
} }
} }
@override @override
@ -209,7 +210,18 @@ class _SearchByClinicState extends State<SearchByClinic> {
}); });
}, },
), ),
Text(TranslationBase.of(context).nearestAppo, style: TextStyle(fontSize: 14.0, letterSpacing: -0.56)), AutoSizeText(
TranslationBase.of(context).nearestAppo.trim(),
maxLines: 1,
minFontSize: 10,
style: TextStyle(
fontSize: SizeConfig.textMultiplier! * 1.4,
fontWeight: FontWeight.w600,
letterSpacing: -0.39,
height: 0.8,
),
),
// Text(TranslationBase.of(context).nearestAppo, style: TextStyle(fontSize: 14.0, letterSpacing: -0.56)),
], ],
), ),
), ),
@ -327,7 +339,18 @@ class _SearchByClinicState extends State<SearchByClinic> {
items: projectsList.map((HospitalsModel item) { items: projectsList.map((HospitalsModel item) {
return DropdownMenuItem<HospitalsModel>( return DropdownMenuItem<HospitalsModel>(
value: item, value: item,
child: Text('${item.name!}'), child: AutoSizeText(
item.name!,
maxLines: 1,
minFontSize: 10,
style: TextStyle(
fontSize: SizeConfig.textMultiplier! * 1.6,
fontWeight: FontWeight.w600,
letterSpacing: -0.39,
height: 0.8,
),
),
// Text('${item.name!}'),
); );
}).toList(), }).toList(),
onChanged: (HospitalsModel? newValue) async { onChanged: (HospitalsModel? newValue) async {
@ -650,7 +673,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err, localContext: context);
}); });
} }

@ -1,4 +1,7 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart'; import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
@ -79,7 +82,7 @@ class _ClickListDialogState extends State<ClickListDialog> {
}, },
decoration: InputDecoration( decoration: InputDecoration(
hintStyle: TextStyle(fontSize: 17), hintStyle: TextStyle(fontSize: 17),
hintText: 'Search Clinic', hintText: TranslationBase.of(context).searchClinic,
suffixIcon: Icon(Icons.search), suffixIcon: Icon(Icons.search),
border: InputBorder.none, border: InputBorder.none,
contentPadding: EdgeInsets.all(12), contentPadding: EdgeInsets.all(12),
@ -99,7 +102,19 @@ class _ClickListDialogState extends State<ClickListDialog> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Expanded(child: Text(tempClinicsList[index].clinicDescription!.trim())), Expanded(
child: AutoSizeText(
tempClinicsList[index].clinicDescription!.trim(),
maxLines: 1,
minFontSize: 10,
style: TextStyle(
fontSize: SizeConfig.textMultiplier! * 1.4,
fontWeight: FontWeight.w600,
letterSpacing: -0.39,
height: 0.8,
),
),
),
tempClinicsList[index].isLiveCareClinicAndOnline! tempClinicsList[index].isLiveCareClinicAndOnline!
? SvgPicture.asset( ? SvgPicture.asset(
'assets/images/new-design/video_icon_green_right.svg', 'assets/images/new-design/video_icon_green_right.svg',

@ -36,7 +36,7 @@ class DoctorView extends StatefulWidget {
DoctorView( DoctorView(
{required this.doctor, {required this.doctor,
this.isLiveCareAppointment, this.isLiveCareAppointment,
this.isObGyneAppointment = false, this.isObGyneAppointment = false,
this.isDoctorNameSearch = false, this.isDoctorNameSearch = false,
this.isContinueDentalPlan = false, this.isContinueDentalPlan = false,
@ -50,7 +50,6 @@ class DoctorView extends StatefulWidget {
} }
class _DoctorViewState extends State<DoctorView> with AutomaticKeepAliveClientMixin { class _DoctorViewState extends State<DoctorView> with AutomaticKeepAliveClientMixin {
late ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
@override @override
@ -99,10 +98,12 @@ class _DoctorViewState extends State<DoctorView> with AutomaticKeepAliveClientMi
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
), ),
), ),
widget.isShowDate ? Text( widget.isShowDate
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.doctor.date)), ? Text(
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12), DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.doctor.date)),
) : Container(), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
)
: Container(),
], ],
), ),
if (widget.doctor.doctorTitle != null) SizedBox(height: 6), if (widget.doctor.doctorTitle != null) SizedBox(height: 6),
@ -123,12 +124,20 @@ class _DoctorViewState extends State<DoctorView> with AutomaticKeepAliveClientMi
children: <Widget>[ children: <Widget>[
if (widget.doctor.clinicName != null) MyRichText(TranslationBase.of(context).clinic + ":", widget.doctor.clinicName!, context.read<ProjectViewModel>().isArabic), if (widget.doctor.clinicName != null) MyRichText(TranslationBase.of(context).clinic + ":", widget.doctor.clinicName!, context.read<ProjectViewModel>().isArabic),
if (widget.doctor.projectName != null) MyRichText(TranslationBase.of(context).branch, widget.doctor.projectName!, context.read<ProjectViewModel>().isArabic), if (widget.doctor.projectName != null) MyRichText(TranslationBase.of(context).branch, widget.doctor.projectName!, context.read<ProjectViewModel>().isArabic),
if (widget.doctor.speciality != null && widget.doctor.speciality!.length > 0) if (!projectViewModel.isArabic)
Text( if (widget.doctor.speciality != null && widget.doctor.speciality!.length > 0)
this.widget.doctor.speciality![0].trim(), Text(
// getDoctorSpeciality(this.doctor.speciality).trim(), this.widget.doctor.speciality![0].trim(),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12), // getDoctorSpeciality(this.doctor.speciality).trim(),
), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
),
if (projectViewModel.isArabic)
if (widget.doctor.specialityN != null && widget.doctor.specialityN!.length > 0)
Text(
this.widget.doctor.specialityN![0].trim(),
// getDoctorSpeciality(this.doctor.speciality).trim(),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
),
if (widget.doctor.nearestFreeSlot != null) if (widget.doctor.nearestFreeSlot != null)
Text( Text(
getDate(widget.doctor.nearestFreeSlot), getDate(widget.doctor.nearestFreeSlot),
@ -147,9 +156,18 @@ class _DoctorViewState extends State<DoctorView> with AutomaticKeepAliveClientMi
itemSize: 20, itemSize: 20,
ignoreGestures: true, ignoreGestures: true,
ratingWidget: RatingWidget( ratingWidget: RatingWidget(
full: Icon(Icons.star, color: CustomColors.accentColor,), full: Icon(
half: Icon(Icons.star_half, color: CustomColors.accentColor,), Icons.star,
empty: Icon(Icons.star, color: CustomColors.accentColor,), color: CustomColors.accentColor,
),
half: Icon(
Icons.star_half,
color: CustomColors.accentColor,
),
empty: Icon(
Icons.star,
color: CustomColors.accentColor,
),
), ),
tapOnlyMode: true, tapOnlyMode: true,
itemPadding: EdgeInsets.symmetric(horizontal: 4.0), itemPadding: EdgeInsets.symmetric(horizontal: 4.0),
@ -267,8 +285,14 @@ class _DoctorViewState extends State<DoctorView> with AutomaticKeepAliveClientMi
} }
void next(BuildContext context) { void next(BuildContext context) {
Navigator.push(context, Navigator.push(
FadePage(page: ObGyneTimeSlots(projectID: widget.doctor.projectID!, selectedClinicID: widget.doctor.clinicID!, selectedDoctorID: widget.doctor.doctorID!, obGyneProcedureListResponse: widget.obGyneProcedureListResponse!))); context,
FadePage(
page: ObGyneTimeSlots(
projectID: widget.doctor.projectID!,
selectedClinicID: widget.doctor.clinicID!,
selectedDoctorID: widget.doctor.doctorID!,
obGyneProcedureListResponse: widget.obGyneProcedureListResponse!)));
} }
Future navigateToDoctorProfile(context, docObject, docProfile, {isAppo, bool isContinueDentalPlan = false}) async { Future navigateToDoctorProfile(context, docObject, docProfile, {isAppo, bool isContinueDentalPlan = false}) async {

@ -420,7 +420,6 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
addAdvancedNumberRequest(String advanceNumber, String paymentReference, String appointmentID) { addAdvancedNumberRequest(String advanceNumber, String paymentReference, String appointmentID) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, context).then((res) { service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, context).then((res) {
print(res);
getAppoQR(context); getAppoQR(context);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);

@ -272,7 +272,7 @@ class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvance
if (isCopy) { if (isCopy) {
Share.share(paymentLink); Share.share(paymentLink);
} else { } else {
this.browser.openUrlRequest(urlRequest: URLRequest(url: Uri.parse(paymentLink)), options: _InAppBrowserOptions); this.browser.openUrlRequest(urlRequest: URLRequest(url: WebUri.uri(Uri.parse(paymentLink))), options: _InAppBrowserOptions);
} }
} else { } else {
AppToast.showErrorToast(message: res["endUserMessage"]); AppToast.showErrorToast(message: res["endUserMessage"]);

@ -405,6 +405,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
Widget _appointmentExpandableList(List<PatientAppointmentList> _patientAppointmentList) { Widget _appointmentExpandableList(List<PatientAppointmentList> _patientAppointmentList) {
return ListView.separated( return ListView.separated(
addAutomaticKeepAlives: true,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
padding: EdgeInsets.only(top: 12), padding: EdgeInsets.only(top: 12),
separatorBuilder: (context, index) { separatorBuilder: (context, index) {

@ -1024,6 +1024,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}); });
} }
@ -1493,6 +1494,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async { onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.toString()}"); log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString()); AppToast.showErrorToast(message: failureResult.toString());
}, },

@ -22,8 +22,7 @@ import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doct
import 'package:diplomaticquarterapp/pages/videocall-webrtc-rnd/webrtc/start_video_call.dart'; import 'package:diplomaticquarterapp/pages/videocall-webrtc-rnd/webrtc/start_video_call.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart' import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart' as family;
as family;
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/services/payfort_services/payfort_view_model.dart'; import 'package:diplomaticquarterapp/services/payfort_services/payfort_view_model.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
@ -76,8 +75,7 @@ class LandingPage extends StatefulWidget {
class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver { class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
var authProvider = new AuthProvider(); var authProvider = new AuthProvider();
AppointmentRateViewModel appointmentRateViewModel = AppointmentRateViewModel appointmentRateViewModel = locator<AppointmentRateViewModel>();
locator<AppointmentRateViewModel>();
int currentTab = 0; int currentTab = 0;
late PageController pageController; late PageController pageController;
@ -94,8 +92,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
bool _showBottomNavigationBar = true; bool _showBottomNavigationBar = true;
///inject the user data ///inject the user data
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
locator<AuthenticatedUserObject>();
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging.instance; final FirebaseMessaging _firebaseMessaging = FirebaseMessaging.instance;
final authService = new AuthProvider(); final authService = new AuthProvider();
@ -122,22 +119,17 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
"appointmentdate": "2022-01-19", "appointmentdate": "2022-01-19",
"appointmenttime": "12:10", "appointmenttime": "12:10",
"PatientName": "Testing", "PatientName": "Testing",
"session_id": "session_id": "1_MX40NjIwOTk2Mn5-MTY0NzI1NjYxNDI2OX5ySXhlVjZjam13RFdMVmdleWVsSDhzQkx-fg",
"1_MX40NjIwOTk2Mn5-MTY0NzI1NjYxNDI2OX5ySXhlVjZjam13RFdMVmdleWVsSDhzQkx-fg",
"token": "token":
"T1==cGFydG5lcl9pZD00NjIwOTk2MiZzaWc9OGMyY2IyYWFiZmZmMzI4ZmEwMjgxNDdmMGFhZGI0N2JiZjdmZWY4MjpzZXNzaW9uX2lkPTFfTVg0ME5qSXdPVGsyTW41LU1UWTBOekkxTmpZeE5ESTJPWDV5U1hobFZqWmphbTEzUkZkTVZtZGxlV1ZzU0RoelFreC1mZyZjcmVhdGVfdGltZT0xNjQ3MjU2NjE0Jm5vbmNlPTAuMjgzNDgyNjM1NDczNjQ2OCZyb2xlPW1vZGVyYXRvciZleHBpcmVfdGltZT0xNjQ3MjU4NDE0JmluaXRpYWxfbGF5b3V0X2NsYXNzX2xpc3Q9", "T1==cGFydG5lcl9pZD00NjIwOTk2MiZzaWc9OGMyY2IyYWFiZmZmMzI4ZmEwMjgxNDdmMGFhZGI0N2JiZjdmZWY4MjpzZXNzaW9uX2lkPTFfTVg0ME5qSXdPVGsyTW41LU1UWTBOekkxTmpZeE5ESTJPWDV5U1hobFZqWmphbTEzUkZkTVZtZGxlV1ZzU0RoelFreC1mZyZjcmVhdGVfdGltZT0xNjQ3MjU2NjE0Jm5vbmNlPTAuMjgzNDgyNjM1NDczNjQ2OCZyb2xlPW1vZGVyYXRvciZleHBpcmVfdGltZT0xNjQ3MjU4NDE0JmluaXRpYWxfbGF5b3V0X2NsYXNzX2xpc3Q9",
"DoctorImageURL": "DoctorImageURL": "https://image.shutterstock.com/image-vector/sample-stamp-square-grunge-sign-260nw-1474408826.jpg",
"https://image.shutterstock.com/image-vector/sample-stamp-square-grunge-sign-260nw-1474408826.jpg",
"callerID": "9920", "callerID": "9920",
"PatientID": "1231755", "PatientID": "1231755",
"is_call": "true" "is_call": "true"
}; };
void _requestIOSPermissions() { void _requestIOSPermissions() {
flutterLocalNotificationsPlugin flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<IOSFlutterLocalNotificationsPlugin>()?.requestPermissions(
.resolvePlatformSpecificImplementation<
IOSFlutterLocalNotificationsPlugin>()
?.requestPermissions(
alert: true, alert: true,
badge: true, badge: true,
sound: true, sound: true,
@ -153,8 +145,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
return Future.value(false); return Future.value(false);
} else { } else {
DateTime now = DateTime.now(); DateTime now = DateTime.now();
if (currentBackPressTime == null || if (currentBackPressTime == null || now.difference(currentBackPressTime!) > Duration(seconds: 2)) {
now.difference(currentBackPressTime!) > Duration(seconds: 2)) {
currentBackPressTime = now; currentBackPressTime = now;
AppToast.showToast(message: TranslationBase.of(context).pressAgain); AppToast.showToast(message: TranslationBase.of(context).pressAgain);
return Future.value(false); return Future.value(false);
@ -169,18 +160,14 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
List<ImagesInfo> imagesInfo = []; List<ImagesInfo> imagesInfo = [];
imagesInfo.add( imagesInfo.add(
ImagesInfo( ImagesInfo(
imageEn: imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/en/0.png',
'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/ar/0.png'),
imageAr:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/ar/0.png'),
); );
imagesInfo.add( imagesInfo.add(
ImagesInfo( ImagesInfo(
imageEn: imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/en/1.png',
'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/ar/1.png'),
imageAr:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/ar/1.png'),
); );
Navigator.push( Navigator.push(
@ -199,11 +186,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
} }
if (tab == 4) { if (tab == 4) {
List<ImagesInfo> imagesInfo = []; List<ImagesInfo> imagesInfo = [];
imagesInfo.add(ImagesInfo( imagesInfo.add(
imageEn: ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/todo/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/todo/ar/0.png'));
'https://hmgwebservices.com/Images/MobileApp/images-info-home/todo/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/todo/ar/0.png'));
Navigator.push( Navigator.push(
context, context,
@ -248,8 +232,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
}); });
}); });
projectViewModel.analytics.bottomTabNavigation projectViewModel.analytics.bottomTabNavigation.log(tabIndex: tab, isLoggedIn: projectViewModel.isLogin);
.log(tabIndex: tab, isLoggedIn: projectViewModel.isLogin);
} }
getToDoCount() { getToDoCount() {
@ -260,11 +243,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
print(res['AppointmentActiveNumber']); print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
// toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount); // toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
toDoProvider.setState( toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, toDoProvider.notificationsCount);
res['AppointmentActiveNumber'],
res['AncillaryOrderListCount'],
true,
toDoProvider.notificationsCount);
} else {} } else {}
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -303,10 +282,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
if (projectViewModel.isLogin && !projectViewModel.isLoginChild) { if (projectViewModel.isLogin && !projectViewModel.isLoginChild) {
int languageID = int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
Provider.of<ProjectViewModel>(context, listen: false).isArabic
? 1
: 2;
familyFileProvider.getSharedRecordByStatus(languageID); familyFileProvider.getSharedRecordByStatus(languageID);
} }
// Future.delayed(Duration(seconds: 3)).then((result) async { // Future.delayed(Duration(seconds: 3)).then((result) async {
@ -322,31 +298,34 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
// HMGNetworkConnectivity(context).start(); // HMGNetworkConnectivity(context).start();
_firebaseMessaging.getToken().then((String? token) { _firebaseMessaging.getToken().then((String? token) {
print("Firebase Token: " + token!); // print("Firebase Token: " + token!);
sharedPref.setString(PUSH_TOKEN, token!); sharedPref.setString(PUSH_TOKEN, token!);
if (Platform.isIOS) { if (Platform.isIOS) {
FirebaseMessaging.instance.getAPNSToken().then((value) { FirebaseMessaging.instance.getAPNSToken().then((value) {
print("Push APNS getToken: " + value!); print("Push APNS getToken: " + value!);
AppSharedPreferences().setString(APNS_TOKEN, value); AppSharedPreferences().setString(APNS_TOKEN, value);
AppSharedPreferences().setString(ONESIGNAL_APNS_TOKEN, value); AppSharedPreferences().setString(ONESIGNAL_APNS_TOKEN, value);
}); });
// voIPKit.getVoIPToken().then((value) { // voIPKit.getVoIPToken().then((value) {
// print('🎈 example: getVoIPToken: $value'); // print('🎈 example: getVoIPToken: $value');
// AppSharedPreferences().setString(APNS_TOKEN, value!); // AppSharedPreferences().setString(APNS_TOKEN, value!);
// // getOneSignalVOIPToken(value); // // getOneSignalVOIPToken(value);
// }); // });
} }
if (token != null) { if (token != null) {
DEVICE_TOKEN = token; DEVICE_TOKEN = token;
if (!projectViewModel.isLoginChild) { if (!projectViewModel.isLoginChild) {
checkUserStatus(token); checkUserStatus(token);
} }
} }
}).catchError((err) {
print(err);
}); });
startZoom(); startZoom();
// HMG_Geofencing(context).loadZones().then((instance) => instance.init()); // HMG_Geofencing(context).loadZones().then((instance) => instance.init());
} }
void startZoom(){
void startZoom() {
var zoom = ZoomVideoSdk(); var zoom = ZoomVideoSdk();
InitConfig initConfig = InitConfig( InitConfig initConfig = InitConfig(
domain: "zoom.us", domain: "zoom.us",
@ -476,20 +455,14 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
getNotificationCount(token) async { getNotificationCount(token) async {
if (await sharedPref.getObject(USER_PROFILE) != null) { if (await sharedPref.getObject(USER_PROFILE) != null) {
var data = var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
if (data != null) { if (data != null) {
authService.getDashboard().then((value) => { authService.getDashboard().then((value) => {
if (value != null) if (value != null)
{ {
setState(() { setState(() {
notificationCount = value['List_PatientDashboard'][0] notificationCount =
['UnreadPatientNotificationCount'] > value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
99
? '99+'
: value['List_PatientDashboard'][0]
['UnreadPatientNotificationCount']
.toString();
model.setState(model.count, 0, true, notificationCount); model.setState(model.count, 0, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount); sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
}) })
@ -519,11 +492,9 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
getText(currentTab).toUpperCase(), getText(currentTab).toUpperCase(),
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: currentTab == 0 color: currentTab == 0 ? CustomColors.backgroudGreyColor : CustomColors.accentColor,
? CustomColors.backgroudGreyColor // : Theme.of(context).textTheme.headline1!.color,
: Theme.of(context).textTheme.headline1!.color, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
fontFamily:
projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
// bold: true, // bold: true,
), ),
leading: Builder( leading: Builder(
@ -532,14 +503,10 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
children: <Widget>[ children: <Widget>[
currentTab == 0 currentTab == 0
? IconButton( ? IconButton(
icon: SvgPicture.asset( icon: SvgPicture.asset("assets/images/new/menu.svg"),
"assets/images/new/menu.svg"), // color: Theme.of(context).textTheme.headline1!.color,
color: Theme.of(context) color: CustomColors.white,
.textTheme onPressed: () => Scaffold.of(context).openDrawer(),
.headline1!
.color,
onPressed: () =>
Scaffold.of(context).openDrawer(),
) )
: IconButton( : IconButton(
icon: Icon(Icons.arrow_back), icon: Icon(Icons.arrow_back),
@ -550,9 +517,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
pageController.jumpToPage(0); pageController.jumpToPage(0);
}, },
), ),
projectViewModel.isLogin && projectViewModel.isLogin && model.notificationsCount != null && !projectViewModel.isLoginChild
model.notificationsCount != null &&
!projectViewModel.isLoginChild
? Positioned( ? Positioned(
right: projectViewModel.isArabic ? 35 : 0, right: projectViewModel.isArabic ? 35 : 0,
top: 5, top: 5,
@ -570,8 +535,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
model.notificationsCount.toString(), model.notificationsCount.toString(),
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: fontSize: projectViewModel.isArabic ? 8 : 9,
projectViewModel.isArabic ? 8 : 9,
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
@ -655,16 +619,15 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
index: currentTab, index: currentTab,
), ),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: floatingActionButton: (projectViewModel.havePrivilege(34) && currentTab == 0)
(projectViewModel.havePrivilege(34) && currentTab == 0) ? FloatingButton(
? FloatingButton( elevation: true,
elevation: true, onTap: () {
onTap: () { changeCurrentTab(2);
changeCurrentTab(2); projectViewModel.analytics.appointment.book_appointment();
projectViewModel.analytics.appointment.book_appointment(); },
}, )
) : null);
: null);
} }
triggerRobot() { triggerRobot() {
@ -692,22 +655,13 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
await PushNotificationHandler.getInstance().requestPermissions(); await PushNotificationHandler.getInstance().requestPermissions();
// authService.selectDeviceImei(token).then((SelectDeviceIMEIRES? value) => setUserValues(value)); // authService.selectDeviceImei(token).then((SelectDeviceIMEIRES? value) => setUserValues(value));
if (authenticatedUserObject.isLogin) { if (authenticatedUserObject.isLogin) {
var data = var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
if (data != null) { if (data != null) {
authService authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {});
.registeredAuthenticatedUser(data, token, 0, 0)
.then((res) => {});
authService.getDashboard().then((value) async { authService.getDashboard().then((value) async {
setState(() { setState(() {
if (value != null) { if (value != null) {
notificationCount = value['List_PatientDashboard'][0] notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
['UnreadPatientNotificationCount'] >
99
? '99+'
: value['List_PatientDashboard'][0]
['UnreadPatientNotificationCount']
.toString();
model.setState(model.count, 0, true, notificationCount); model.setState(model.count, 0, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount); sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
FlutterAppIconBadge.updateBadge(int.parse(notificationCount)); FlutterAppIconBadge.updateBadge(int.parse(notificationCount));

@ -2,6 +2,8 @@ import 'dart:io';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/LiveCare/ERAppointmentFeesResponse.dart'; import 'package:diplomaticquarterapp/models/LiveCare/ERAppointmentFeesResponse.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart'; import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
@ -13,6 +15,7 @@ import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/covid_consent_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/covid_consent_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
@ -282,53 +285,87 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
Container( Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
color: Colors.white, color: Colors.white,
child: Flex( child: Column(
direction: Axis.horizontal, children: [
children: <Widget>[ Flex(
Expanded( direction: Axis.horizontal,
child: DefaultButton( children: <Widget>[
TranslationBase.of(context).cancel, Expanded(
() { child: DefaultButton(
if (widget.isPharmaLiveCare) cancelAPI(); TranslationBase.of(context).cancel,
Navigator.pop(context, false); () {
}, if (widget.isPharmaLiveCare) cancelAPI();
), Navigator.pop(context, false);
), },
mWidth(12), ),
Expanded( ),
child: DefaultButton( mWidth(12),
TranslationBase.of(context).next, Expanded(
() { child: DefaultButton(
if (_selected == 0) { TranslationBase.of(context).next,
AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms); () {
} else { if (_selected == 0) {
if (widget.isPharmaLiveCare) { AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms);
Navigator.pop(context, true); } else {
} else { if (widget.isPharmaLiveCare) {
askVideoCallPermission().then((value) async { Navigator.pop(context, true);
if (value == true) {
locationUtils = new LocationUtils(isShowConfirmDialog: false, context: context);
locationUtils.getCurrentLocation(callBack: (value) {
print(value);
});
if (Platform.isAndroid && !(await PlatformBridge.shared().isDrawOverAppsPermissionAllowed())) {
await drawOverAppsMessageDialog(context).then((value) {
return false;
});
} else {
Navigator.pop(context, true);
projectViewModel.analytics.liveCare.livecare_immediate_consultation_TnC(clinic: widget.clinicName);
}
} else { } else {
openPermissionsDialog(); askVideoCallPermission().then((value) async {
if (value == true) {
locationUtils = new LocationUtils(isShowConfirmDialog: false, context: context);
locationUtils.getCurrentLocation(callBack: (value) {
print(value);
});
if (Platform.isAndroid && !(await PlatformBridge.shared().isDrawOverAppsPermissionAllowed())) {
await drawOverAppsMessageDialog(context).then((value) {
return false;
});
} else {
Navigator.pop(context, true);
projectViewModel.analytics.liveCare.livecare_immediate_consultation_TnC(clinic: widget.clinicName);
}
} else {
openPermissionsDialog();
}
});
} }
}); }
} },
} color: CustomColors.green,
}, ),
color: CustomColors.green, ),
), ],
), ),
widget.getERAppointmentFeesList.isCash!
? Column(
children: [
mHeight(10.0),
Text(
TranslationBase.of(context).cashAmountUpdateInsurance,
style: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
),
),
mHeight(5.0),
DefaultButton(
TranslationBase.of(context).updateInsuranceText,
() {
Navigator.pop(context, null);
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (context) => LandingPage()),
(Route<dynamic> route) => false,
);
Navigator.push(context, FadePage(page: InsuranceUpdate()));
},
color: Color(0xffEAA118),
textColor: Colors.white,
),
],
)
: Container(),
], ],
), ),
), ),

@ -171,7 +171,7 @@ class _LiveCareHomeState extends State<LiveCareHome> with SingleTickerProviderSt
}); });
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err, localContext: context);
print(err); print(err);
}); });
} }

@ -14,7 +14,7 @@ class VideoCallWebPage extends StatelessWidget{
final String receiverId; final String receiverId;
final String callerId; final String callerId;
VideoCallWebPage({required this.receiverId, required this.callerId}){ VideoCallWebPage({required this.receiverId, required this.callerId}){
request = URLRequest(url: Uri.parse("https://vcallapi.hmg.com/Mobileindex.html?username=$receiverId&doctorid=$callerId")); request = URLRequest(url: WebUri.uri(Uri.parse("https://vcallapi.hmg.com/Mobileindex.html?username=$receiverId&doctorid=$callerId")));
} }
InAppWebViewGroupOptions options = InAppWebViewGroupOptions( InAppWebViewGroupOptions options = InAppWebViewGroupOptions(

@ -15,6 +15,7 @@ import 'package:diplomaticquarterapp/models/LiveCare/LiveCareClinicsListResponse
import 'package:diplomaticquarterapp/models/LiveCare/LiveCareScheduleClinicsListResponse.dart'; import 'package:diplomaticquarterapp/models/LiveCare/LiveCareScheduleClinicsListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_scheduling/schedule_clinic_card.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_scheduling/schedule_clinic_card.dart';
@ -196,11 +197,39 @@ class _clinic_listState extends State<ClinicList> {
getERAppointmentTime(GetERAppointmentFeesList getERAppointmentFeesList) { getERAppointmentTime(GetERAppointmentFeesList getERAppointmentFeesList) {
int languageID = projectViewModel.isArabic ? 1 : 2; int languageID = projectViewModel.isArabic ? 1 : 2;
String errorMsg = "";
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service.getERAppointmentTime(selectedClinicID, widget.isPharmacyLiveCare, languageID, context).then((res) { service.getERAppointmentTime(selectedClinicID, widget.isPharmacyLiveCare, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
showLiveCarePaymentDialog(getERAppointmentFeesList, res['WatingtimeInteger']);
// getERAppointmentFeesList.isCash = false;
// getERAppointmentFeesList.isInsured = true;
// getERAppointmentFeesList.isEligible = false;
if (getERAppointmentFeesList.isCash!) {
showLiveCarePaymentDialog(getERAppointmentFeesList, res['WatingtimeInteger']);
} else {
if (getERAppointmentFeesList.isInsured! && getERAppointmentFeesList.isEligible!) {
showLiveCarePaymentDialog(getERAppointmentFeesList, res['WatingtimeInteger']);
} else {
if (getERAppointmentFeesList.isInsured! && !getERAppointmentFeesList.isEligible!) {
errorMsg = TranslationBase.of(context).invalidEligibility;
} else {
errorMsg = TranslationBase.of(context).invalidInsurance;
}
ConfirmDialog dialog = new ConfirmDialog(
isDissmissable: false,
context: context,
confirmMessage: errorMsg,
okText: TranslationBase.of(context).updateInsuranceText,
cancelText: TranslationBase.of(context).continueCash,
okFunction: () => {openUpdateInsurance()},
cancelFunction: () => {continueAsCash()});
dialog.showAlertDialog(context);
}
}
// showLiveCarePaymentDialog(getERAppointmentFeesList, res['WatingtimeInteger']);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
@ -208,6 +237,28 @@ class _clinic_listState extends State<ClinicList> {
}); });
} }
void continueAsCash() {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service.convertPatientToCash(BASE_URL.contains("uat.") ? 15 : 12).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res["MessageStatus"] == 1) {
startLiveCare();
} else {
AppToast.showErrorToast(message: res["ErrorEndUserMessage"]);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
void openUpdateInsurance() {
Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false);
Navigator.push(context, FadePage(page: InsuranceUpdate()));
}
showLiveCarePaymentDialog(GetERAppointmentFeesList getERAppointmentFeesList, int waitingTime) { showLiveCarePaymentDialog(GetERAppointmentFeesList getERAppointmentFeesList, int waitingTime) {
navigateTo( navigateTo(
context, context,
@ -413,28 +464,28 @@ class _clinic_listState extends State<ClinicList> {
service.applePayInsertRequest(applePayInsertRequest, localContext!).then((res) async { service.applePayInsertRequest(applePayInsertRequest, localContext!).then((res) async {
if (res["MessageStatus"] == 1) { if (res["MessageStatus"] == 1) {
await localContext!.read<PayfortViewModel>().initiateApplePayWithPayfort( await localContext!.read<PayfortViewModel>().initiateApplePayWithPayfort(
customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com", customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
orderDescription: "LiveCare Payment", orderDescription: "LiveCare Payment",
orderAmount: double.parse(amount), orderAmount: double.parse(amount),
merchantReference: transID, merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async { onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}"); log("failureResult: ${failureResult.toString()}");
GifLoaderDialogUtils.hideDialog(localContext!); GifLoaderDialogUtils.hideDialog(localContext!);
AppToast.showErrorToast(message: failureResult.toString()); AppToast.showErrorToast(message: failureResult.toString());
}, },
onSuccess: (successResult) async { onSuccess: (successResult) async {
GifLoaderDialogUtils.hideDialog(localContext!); GifLoaderDialogUtils.hideDialog(localContext!);
log("Payfort: ${successResult.responseMessage}"); log("Payfort: ${successResult.responseMessage}");
await localContext!.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult); await localContext!.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult);
checkPaymentStatus(appo); checkPaymentStatus(appo);
}, },
projectId: appo.projectID, projectId: appo.projectID,
serviceTypeEnum: ServiceTypeEnum.appointmentPayment, serviceTypeEnum: ServiceTypeEnum.appointmentPayment,
); );
} else { } else {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: "An error occurred while processing your request"); AppToast.showErrorToast(message: "An error occurred while processing your request");

@ -41,7 +41,7 @@ import 'package:flutter_svg/flutter_svg.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:local_auth/local_auth.dart'; import 'package:local_auth/local_auth.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:local_auth_ios/types/auth_messages_ios.dart'; // import 'package:local_auth_ios/types/auth_messages_ios.dart';
class ConfirmLogin extends StatefulWidget { class ConfirmLogin extends StatefulWidget {
final Function? changePageViewIndex; final Function? changePageViewIndex;
@ -552,11 +552,11 @@ class _ConfirmLogin extends State<ConfirmLogin> {
stickyAuth: true, stickyAuth: true,
), ),
authMessages: [ authMessages: [
IOSAuthMessages( // IOSAuthMessages(
cancelButton: 'cancel', // cancelButton: 'cancel',
goToSettingsButton: 'settings', // goToSettingsButton: 'settings',
goToSettingsDescription: 'Please set up your Touch ID.', // goToSettingsDescription: 'Please set up your Touch ID.',
lockOut: 'Please reenable your Touch ID'), // lockOut: 'Please reenable your Touch ID'),
], ],
); );
} on PlatformException catch (e) { } on PlatformException catch (e) {

@ -1,4 +1,6 @@
import 'package:cloudflare_turnstile/cloudflare_turnstile.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
@ -27,6 +29,23 @@ class _ForgotPassword extends State<ForgotPassword> {
String mobileNo = ""; String mobileNo = "";
var con; var con;
final TurnstileController _controller = TurnstileController();
final TurnstileOptions _options = TurnstileOptions(
size: TurnstileSize.normal,
theme: TurnstileTheme.light,
refreshExpired: TurnstileRefreshExpired.manual,
language: 'en',
retryAutomatically: false,
);
String? _token;
@override
void dispose() {
super.dispose();
_controller.dispose();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
con = context; con = context;
@ -66,6 +85,25 @@ class _ForgotPassword extends State<ForgotPassword> {
countryCode = value; countryCode = value;
}); });
}), }),
const SizedBox(height: 12.0),
CloudFlareTurnstile(
siteKey: '0x4AAAAAAAkmbvEy63pcxBBt',
baseUrl: BASE_URL,
options: _options,
controller: _controller,
onTokenRecived: (token) {
setState(() {
print("Cloudflare token: $token");
_token = token;
});
},
onTokenExpired: () {},
mode: TurnstileMode.managed,
errorBuilder: (context, error) {
return Text(error.message);
},
),
const SizedBox(height: 48.0),
], ],
), ),
), ),

@ -450,7 +450,7 @@ class _RegisterInfo extends State<RegisterInfo> {
else else
request = getTempUserRequest(); request = getTempUserRequest();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false);
dynamic res; dynamic res;
this this
.authService .authService
@ -480,7 +480,7 @@ class _RegisterInfo extends State<RegisterInfo> {
sharedPref.remove(FAMILY_FILE), sharedPref.remove(FAMILY_FILE),
result.list.isFamily = false, result.list.isFamily = false,
sharedPref.setString(BLOOD_TYPE, result.patientBloodType), sharedPref.setString(BLOOD_TYPE, result.patientBloodType ?? ""),
authenticatedUserObject.user = result.list, authenticatedUserObject.user = result.list,
projectViewModel.setPrivilege(privilegeList: res), projectViewModel.setPrivilege(privilegeList: res),
sharedPref.setObject(MAIN_USER, result.list), sharedPref.setObject(MAIN_USER, result.list),

@ -40,6 +40,7 @@ class AskDoctorPage extends StatelessWidget {
Widget _appointmentExpandableList(List<PatientDoctorAppointmentList> _patientDoctorAppointmentList, model) { Widget _appointmentExpandableList(List<PatientDoctorAppointmentList> _patientDoctorAppointmentList, model) {
return ListView.separated( return ListView.separated(
addAutomaticKeepAlives: true,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
padding: EdgeInsets.only(top: 12), padding: EdgeInsets.only(top: 12),
separatorBuilder: (context, index) { separatorBuilder: (context, index) {

@ -329,6 +329,7 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR", currency: projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async { onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.toString()}"); log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString()); AppToast.showErrorToast(message: failureResult.toString());
}, },
@ -528,7 +529,6 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
addAdvancedNumberRequest(String advanceNumber, String paymentReference, dynamic appointmentID, AppoitmentAllHistoryResultList appo) { addAdvancedNumberRequest(String advanceNumber, String paymentReference, dynamic appointmentID, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, AppGlobal.context).then((res) { service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, AppGlobal.context).then((res) {
print(res);
GifLoaderDialogUtils.hideDialog(AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context);
navigateToHome(AppGlobal.context); navigateToHome(AppGlobal.context);
}).catchError((err) { }).catchError((err) {

@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
@ -363,11 +364,11 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
), ),
errorBorder: OutlineInputBorder( errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(5.0)), borderRadius: BorderRadius.all(Radius.circular(5.0)),
borderSide: BorderSide(color: Theme.of(context).errorColor), borderSide: BorderSide(color: CustomColors.accentColor),
), ),
focusedErrorBorder: OutlineInputBorder( focusedErrorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(5.0)), borderRadius: BorderRadius.all(Radius.circular(5.0)),
borderSide: BorderSide(color: Theme.of(context).errorColor), borderSide: BorderSide(color: CustomColors.accentColor),
), ),
); );
} }

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
@ -184,7 +185,8 @@ class _NewTextFieldsState extends State<NewTextFields> {
autofocus: widget.autoFocus ?? false, autofocus: widget.autoFocus ?? false,
validator: widget.validator, validator: widget.validator,
onSaved: widget.onSaved, onSaved: widget.onSaved,
style: Theme.of(context).textTheme.bodyText2!.copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight), // style: Theme.of(context).textTheme.bodyText2!.copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight),
style: TextStyle(color: Colors.black, letterSpacing: 0.6, fontSize: widget.fontSize, fontWeight: widget.fontWeight),
inputFormatters: widget.keyboardType == TextInputType.phone inputFormatters: widget.keyboardType == TextInputType.phone
? <TextInputFormatter>[ ? <TextInputFormatter>[
FilteringTextInputFormatter.digitsOnly, FilteringTextInputFormatter.digitsOnly,
@ -194,9 +196,9 @@ class _NewTextFieldsState extends State<NewTextFields> {
decoration: InputDecoration( decoration: InputDecoration(
labelText: widget.hintText, labelText: widget.hintText,
counterText: widget.counterText, counterText: widget.counterText,
labelStyle: TextStyle(color: Theme.of(context).textTheme.bodyText1!.color), labelStyle: TextStyle(color: Colors.black),
errorBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).errorColor.withOpacity(0.5), width: 1.0), borderRadius: BorderRadius.circular(12.0)), errorBorder: OutlineInputBorder(borderSide: BorderSide(color: CustomColors.accentColor.withOpacity(0.5), width: 1.0), borderRadius: BorderRadius.circular(12.0)),
focusedErrorBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).errorColor.withOpacity(0.5), width: 1.0), borderRadius: BorderRadius.circular(8.0)), focusedErrorBorder: OutlineInputBorder(borderSide: BorderSide(color: CustomColors.accentColor.withOpacity(0.5), width: 1.0), borderRadius: BorderRadius.circular(8.0)),
focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Colors.white, width: 1.0), borderRadius: BorderRadius.circular(12)), focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Colors.white, width: 1.0), borderRadius: BorderRadius.circular(12)),
disabledBorder: OutlineInputBorder(borderSide: BorderSide(color: Colors.white, width: 1.0), borderRadius: BorderRadius.circular(12)), disabledBorder: OutlineInputBorder(borderSide: BorderSide(color: Colors.white, width: 1.0), borderRadius: BorderRadius.circular(12)),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(

@ -53,6 +53,7 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
child: Column( child: Column(
children: [ children: [
ListView.builder( ListView.builder(
addAutomaticKeepAlives: true,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
padding: EdgeInsets.only(bottom: 12), padding: EdgeInsets.only(bottom: 12),

@ -17,7 +17,7 @@ import 'package:provider/provider.dart';
import 'laboratory_result_page.dart'; import 'laboratory_result_page.dart';
class LabsHomePage extends StatelessWidget { class LabsHomePage extends StatelessWidget {
List<ImagesInfo> imagesInfo =[]; List<ImagesInfo> imagesInfo = [];
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -50,6 +50,7 @@ class LabsHomePage extends StatelessWidget {
child: FractionallySizedBox( child: FractionallySizedBox(
widthFactor: 1.0, widthFactor: 1.0,
child: ListView.separated( child: ListView.separated(
addAutomaticKeepAlives: true,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
padding: EdgeInsets.only(top: 12), padding: EdgeInsets.only(top: 12),
separatorBuilder: (context, index) { separatorBuilder: (context, index) {

@ -26,6 +26,7 @@ class PrescriptionsPage extends StatelessWidget {
return AppScaffold( return AppScaffold(
baseViewModel: prescriptionsViewModel, baseViewModel: prescriptionsViewModel,
body: ListView.separated( body: ListView.separated(
addAutomaticKeepAlives: true,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
padding: EdgeInsets.only(top: 12), padding: EdgeInsets.only(top: 12),
separatorBuilder: (context, index) { separatorBuilder: (context, index) {

@ -54,6 +54,7 @@ class RadiologyHomePage extends StatelessWidget {
child: FractionallySizedBox( child: FractionallySizedBox(
widthFactor: 1.0, widthFactor: 1.0,
child: ListView.separated( child: ListView.separated(
addAutomaticKeepAlives: true,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
padding: EdgeInsets.only(top: 12), padding: EdgeInsets.only(top: 12),
separatorBuilder: (context, index) { separatorBuilder: (context, index) {

@ -71,9 +71,9 @@ class PaymentService extends StatelessWidget {
projectViewModel!.analytics.advancePayments.payment_services(service_type: 'payment service'); projectViewModel!.analytics.advancePayments.payment_services(service_type: 'payment service');
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).payment, title: TranslationBase.of(context).onlinePayment,
imagePath: 'assets/images/new-design/online_payment_icon.png', imagePath: 'assets/images/new-design/online_payment_icon.png',
subTitle: TranslationBase.of(context).paymentOnline, subTitle: TranslationBase.of(context).onlinePaymentSubtitle,
isPngImage: true, isPngImage: true,
width: 65.0, width: 65.0,
height: 55.0, height: 55.0,
@ -182,19 +182,24 @@ class PaymentService extends StatelessWidget {
ClinicListService service = new ClinicListService(); ClinicListService service = new ClinicListService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service service
.getInPatientAdvancePaymentRequests(projectViewModel.inPatientProjectID, projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionNo! : 0, .getInPatientAdvancePaymentRequests(
projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo! : projectViewModel.getAdmissionRequestInfoResponseModel.admissionRequestNo!, context) projectViewModel.inPatientProjectID,
projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionNo! : 0,
projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo! : projectViewModel.getAdmissionRequestInfoResponseModel.admissionRequestNo!,
context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res["MessageStatus"] == 1) { if (res["MessageStatus"] == 1) {
if (res['responseInpatient'] != null) { if (res['responseInpatient'] != null) {
inPatientAdvanceResponseModel = InPatientAdvanceResponseModel.fromJson(res["responseInpatient"]); inPatientAdvanceResponseModel = InPatientAdvanceResponseModel.fromJson(res["responseInpatient"]);
Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: inPatientAdvanceResponseModel.responseInpatientAdvanceInfo != null, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); Navigator.push(context,
FadePage(page: InPatientAdvancePayment(isHasData: inPatientAdvanceResponseModel.responseInpatientAdvanceInfo != null, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel)));
} else { } else {
AppToast.showErrorToast(message: TranslationBase.of(context).noData); AppToast.showErrorToast(message: TranslationBase.of(context).noData);
} }
} else { } else {
Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: inPatientAdvanceResponseModel.responseInpatientAdvanceInfo != null, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); Navigator.push(context,
FadePage(page: InPatientAdvancePayment(isHasData: inPatientAdvanceResponseModel.responseInpatientAdvanceInfo != null, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel)));
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);

@ -95,7 +95,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
MyRichText(TranslationBase.of(context).clinic + ":", model.appointmentDetails.projectName, projectViewModel.isArabic), MyRichText(TranslationBase.of(context).clinic + ":", model.appointmentDetails.projectName ?? "", projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).date + ":", DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(model.appointmentDetails.appointmentDate)), MyRichText(TranslationBase.of(context).date + ":", DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(model.appointmentDetails.appointmentDate)),
projectViewModel.isArabic), projectViewModel.isArabic),
], ],

@ -52,7 +52,7 @@ class ClinicListService extends BaseService {
Future<Map> getProjectsList(int languageID, context) async { Future<Map> getProjectsList(int languageID, context) async {
Map<String, dynamic> request = {}; Map<String, dynamic> request = {};
request = {"LanguageID": languageID}; // request = {"LanguageID": languageID};
dynamic localRes; dynamic localRes;

@ -161,7 +161,7 @@ class PayfortService extends BaseService {
); );
if (sdkTokenResponse != null && sdkTokenResponse.sdkToken == null) { if (sdkTokenResponse != null && sdkTokenResponse.sdkToken == null) {
onFailed!(sdkTokenResponse.responseMessage ?? ''); onFailed!((sdkTokenResponse.responseMessage ?? '') as PayFortFailureResult);
return; return;
} }
@ -176,6 +176,7 @@ class PayfortService extends BaseService {
merchantReference: merchantReference!, merchantReference: merchantReference!,
currency: currency, currency: currency,
customerIp: (await _info.getWifiIP() ?? ''), customerIp: (await _info.getWifiIP() ?? ''),
language: 'en'
); );
_payfort.callPayFortForApplePay( _payfort.callPayFortForApplePay(
@ -188,7 +189,7 @@ class PayfortService extends BaseService {
), ),
); );
} catch (e) { } catch (e) {
onFailed!(e.toString()); onFailed!(e.toString() as PayFortFailureResult);
} }
} }
} }

@ -27,22 +27,22 @@ defaultTheme({fontName}) {
), ),
hintColor: Colors.grey[400], hintColor: Colors.grey[400],
disabledColor: Colors.grey[300], disabledColor: Colors.grey[300],
errorColor: Color.fromRGBO(235, 80, 60, 1.0), // errorColor: Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor: Color(0xffF8F8F8), scaffoldBackgroundColor: Color(0xffF8F8F8),
canvasColor: Colors.white, canvasColor: Colors.white,
backgroundColor: Color.fromRGBO(255, 255, 255, 1), // backgroundColor: Color.fromRGBO(255, 255, 255, 1),
highlightColor: Colors.grey[100]!.withOpacity(0.4), highlightColor: Colors.grey[100]!.withOpacity(0.4),
splashColor: Colors.transparent, splashColor: Colors.transparent,
primaryColor: Color(0xff515A5D), primaryColor: Color(0xff515A5D),
toggleableActiveColor: secondaryColor, // toggleableActiveColor: secondaryColor,
indicatorColor: secondaryColor, indicatorColor: secondaryColor,
bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xFFE0E0E0)), bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xFFE0E0E0)),
primaryTextTheme: TextTheme(bodyText2: TextStyle(color: Colors.white)), // primaryTextTheme: TextTheme(bodyText2: TextStyle(color: Colors.white)),
iconTheme: IconThemeData(), iconTheme: IconThemeData(),
textTheme: TextTheme( textTheme: TextTheme(
bodyText1: TextStyle(color: Colors.black, letterSpacing: 0.6), // bodyText1: TextStyle(color: Colors.black, letterSpacing: 0.6),
headline1: TextStyle(color: Colors.white, letterSpacing: 0.6), // headline1: TextStyle(color: Colors.white, letterSpacing: 0.6),
headline2: TextStyle(color: Colors.white, letterSpacing: 0.6), // headline2: TextStyle(color: Colors.white, letterSpacing: 0.6),
), ),
floatingActionButtonTheme: FloatingActionButtonThemeData(highlightElevation: 2, disabledElevation: 0, elevation: 2), floatingActionButtonTheme: FloatingActionButtonThemeData(highlightElevation: 2, disabledElevation: 0, elevation: 2),
@ -71,16 +71,16 @@ invertThemes({fontName}) {
}, },
), ),
hintColor: Colors.grey[400], hintColor: Colors.grey[400],
textTheme: TextTheme(bodyText1: TextStyle(color: Colors.white), headline1: TextStyle(color: Colors.white), headline2: TextStyle(color: Colors.white)), // textTheme: TextTheme(bodyText1: TextStyle(color: Colors.white), headline1: TextStyle(color: Colors.white), headline2: TextStyle(color: Colors.white)),
disabledColor: Colors.grey[800], disabledColor: Colors.grey[800],
errorColor: Color.fromRGBO(235, 80, 60, 1.0), // errorColor: Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor: Color(0xff000000), scaffoldBackgroundColor: Color(0xff000000),
canvasColor: Colors.black, canvasColor: Colors.black,
backgroundColor: Color.fromRGBO(255, 255, 255, 1), // backgroundColor: Color.fromRGBO(255, 255, 255, 1),
highlightColor: Colors.grey[100]!.withOpacity(0.4), highlightColor: Colors.grey[100]!.withOpacity(0.4),
splashColor: Colors.transparent, splashColor: Colors.transparent,
primaryColor: Color(0xff515A5D), primaryColor: Color(0xff515A5D),
toggleableActiveColor: secondaryColor, // toggleableActiveColor: secondaryColor,
indicatorColor: secondaryColor, indicatorColor: secondaryColor,
bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xFFE0E0E0)), bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xFFE0E0E0)),
iconTheme: IconThemeData(), iconTheme: IconThemeData(),
@ -113,24 +113,24 @@ bwThemes({fontName}) {
hintColor: Colors.grey[400], hintColor: Colors.grey[400],
textTheme: TextTheme( textTheme: TextTheme(
bodyText1: TextStyle(color: Colors.red[900]), // bodyText1: TextStyle(color: Colors.red[900]),
headline1: TextStyle(color: Colors.red[900]), // headline1: TextStyle(color: Colors.red[900]),
headline2: TextStyle(color: Colors.white), // headline2: TextStyle(color: Colors.white),
bodyText2: TextStyle(color: Colors.red[900]), // bodyText2: TextStyle(color: Colors.red[900]),
subtitle1: TextStyle(color: Colors.red[900]), // subtitle1: TextStyle(color: Colors.red[900]),
), ),
tabBarTheme: TabBarTheme(labelColor: Colors.red[900]), tabBarTheme: TabBarTheme(labelColor: Colors.red[900]),
disabledColor: Colors.grey[800], disabledColor: Colors.grey[800],
errorColor: Color.fromRGBO(235, 80, 60, 1.0), // errorColor: Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor: Color(0xffffffe4), scaffoldBackgroundColor: Color(0xffffffe4),
canvasColor: Colors.black, canvasColor: Colors.black,
backgroundColor: Color(0xffffffe4), // backgroundColor: Color(0xffffffe4),
highlightColor: Colors.grey[100]!.withOpacity(0.4), highlightColor: Colors.grey[100]!.withOpacity(0.4),
splashColor: Colors.transparent, splashColor: Colors.transparent,
primaryColor: Color(0xfffffff4), primaryColor: Color(0xfffffff4),
toggleableActiveColor: secondaryColor, // toggleableActiveColor: secondaryColor,
indicatorColor: secondaryColor, indicatorColor: secondaryColor,
bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xFFE0E0E0)), bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xFFE0E0E0)),
iconTheme: IconThemeData(), iconTheme: IconThemeData(),
@ -160,10 +160,10 @@ dimTheme({fontName}) {
), ),
hintColor: Colors.grey[400], hintColor: Colors.grey[400],
disabledColor: Colors.grey[300], disabledColor: Colors.grey[300],
errorColor: Color.fromRGBO(235, 80, 60, 1.0), // errorColor: Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor: Color(0xffEEEEEE), scaffoldBackgroundColor: Color(0xffEEEEEE),
canvasColor: Colors.white, canvasColor: Colors.white,
backgroundColor: Color.fromRGBO(255, 255, 255, 1), // backgroundColor: Color.fromRGBO(255, 255, 255, 1),
highlightColor: Colors.grey[100]!.withOpacity(0.4), highlightColor: Colors.grey[100]!.withOpacity(0.4),
splashColor: Colors.transparent, splashColor: Colors.transparent,
primaryColor: Color(0xff40ACC9), primaryColor: Color(0xff40ACC9),

@ -76,7 +76,8 @@ class AppSharedPreferences {
final SharedPreferences prefs = await _prefs; final SharedPreferences prefs = await _prefs;
await prefs.reload(); await prefs.reload();
String value = prefs.getString(key).toString(); String value = prefs.getString(key).toString();
return value == null ? defaultVal : value; return (value == null) || (value == "null") ? defaultVal : value;
// return value == null ? defaultVal : value;
} }
/// Get List of String [key] the key was saved /// Get List of String [key] the key was saved

@ -357,6 +357,8 @@ class PushNotificationHandler {
FirebaseMessaging.instance.getToken(vapidKey: 'BHRJG8sIzcysWxPw3B6xQjz_85nUuCfU6EAmpH18kyUTmB2cj35IdFwCyWSab80SA1v6oBSWVh-p6PcHPw_y00Y').then((String? token) { FirebaseMessaging.instance.getToken(vapidKey: 'BHRJG8sIzcysWxPw3B6xQjz_85nUuCfU6EAmpH18kyUTmB2cj35IdFwCyWSab80SA1v6oBSWVh-p6PcHPw_y00Y').then((String? token) {
print("Push Notification getToken: " + token!); print("Push Notification getToken: " + token!);
onToken(token!); onToken(token!);
}).catchError((err) {
print(err);
}); });
FirebaseMessaging.instance.onTokenRefresh.listen((fcm_token) { FirebaseMessaging.instance.onTokenRefresh.listen((fcm_token) {
@ -430,7 +432,7 @@ class PushNotificationHandler {
} }
onToken(String token) async { onToken(String token) async {
print("Push Notification Token: " + token); // print("Push Notification Token: " + token);
await AppSharedPreferences().setString(PUSH_TOKEN, token); await AppSharedPreferences().setString(PUSH_TOKEN, token);
DEVICE_TOKEN = token; DEVICE_TOKEN = token;
} }

@ -2964,6 +2964,7 @@ class TranslationBase {
String get wecare => localizedValues["wecare"][locale.languageCode]; String get wecare => localizedValues["wecare"][locale.languageCode];
String get myinstructions => localizedValues["myinstructions"][locale.languageCode]; String get myinstructions => localizedValues["myinstructions"][locale.languageCode];
String get clinicLocation => localizedValues["clinicLocation"][locale.languageCode]; String get clinicLocation => localizedValues["clinicLocation"][locale.languageCode];
String get searchClinic => localizedValues["searchClinic"][locale.languageCode];
} }

@ -831,7 +831,8 @@ class Utils {
children: [ children: [
SizedBox(height: 12), SizedBox(height: 12),
Text( Text(
isCapitable && !projectViewModel.isArabic ? text.toLowerCase().capitalizeFirstofEach : text, // isCapitable && !projectViewModel.isArabic ? text.toLowerCase().capitalizeFirstofEach : text,
text,
maxLines: 2, maxLines: 2,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),

@ -138,14 +138,15 @@ class _AnimatedButtonState extends State<AnimatedButton>
/// sets width and size animation /// sets width and size animation
void _updateWidth() { void _updateWidth() {
final theme = Theme.of(context); final theme = Theme.of(context);
final fontSize = theme.textTheme.button!.fontSize; // final fontSize = theme.textTheme.button!.fontSize;
final fontSize = 12.0;
final renderParagraph = RenderParagraph( final renderParagraph = RenderParagraph(
TextSpan( TextSpan(
text: widget.text, text: widget.text,
style: TextStyle( style: TextStyle(
fontSize: fontSize, fontSize: fontSize,
fontWeight: theme.textTheme.button!.fontWeight, fontWeight: FontWeight.normal,
letterSpacing: theme.textTheme.button!.letterSpacing, letterSpacing: 0.6,
), ),
), ),
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,

@ -3,6 +3,7 @@ import 'dart:io';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; import 'package:diplomaticquarterapp/services/permission/permission_service.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -122,7 +123,7 @@ class _BottomSheet extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
padding: EdgeInsets.symmetric(vertical: 12.0), padding: EdgeInsets.symmetric(vertical: 12.0),
decoration: BoxDecoration(color: Theme.of(context).backgroundColor, borderRadius: BorderRadius.only(topLeft: Radius.circular(16.0), topRight: Radius.circular(16.0))), decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.only(topLeft: Radius.circular(16.0), topRight: Radius.circular(16.0))),
child: SafeArea( child: SafeArea(
top: false, top: false,
child: Column( child: Column(
@ -165,14 +166,14 @@ class _BottomSheetItem extends StatelessWidget {
if (icon != null) if (icon != null)
Icon( Icon(
icon, icon,
color: color == ITEM_COLOR.error ? Theme.of(context).errorColor : Theme.of(context).primaryColor, color: color == ITEM_COLOR.error ? CustomColors.accentColor : Theme.of(context).primaryColor,
size: 18.0, size: 18.0,
), ),
if (icon != null) SizedBox(width: 24.0), if (icon != null) SizedBox(width: 24.0),
Texts( Texts(
title ?? "", title ?? "",
style: "bodyText2", style: "bodyText2",
color: color == ITEM_COLOR.error ? Theme.of(context).errorColor : null, color: color == ITEM_COLOR.error ? CustomColors.accentColor : null,
), ),
], ],
), ),

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -23,18 +24,7 @@ class BottomButton extends StatelessWidget {
final Widget? child; final Widget? child;
final bool disabledPadding; final bool disabledPadding;
BottomButton( BottomButton({Key? key, this.loading = false, this.disabled = false, this.label, this.icon, this.color, this.textColor, this.disabledPadding = false, this.borderColor, this.onTap, this.child})
{Key? key,
this.loading = false,
this.disabled = false,
this.label,
this.icon,
this.color,
this.textColor,
this.disabledPadding = false,
this.borderColor,
this.onTap,
this.child})
: super(key: key); : super(key: key);
@override @override
@ -44,17 +34,7 @@ class BottomButton extends StatelessWidget {
children: <Widget>[ children: <Widget>[
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: LinearGradient( gradient: LinearGradient(begin: Alignment.bottomCenter, end: Alignment.topCenter, stops: [0.0, 0.9], colors: [CustomColors.white, CustomColors.white.withOpacity(0)]),
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
stops: [
0.0,
0.9
],
colors: [
Theme.of(context).backgroundColor,
Theme.of(context).backgroundColor.withOpacity(0)
]),
), ),
alignment: Alignment.center, alignment: Alignment.center,
child: SafeArea( child: SafeArea(
@ -63,46 +43,19 @@ class BottomButton extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
Container( Container(
margin: child != null margin: child != null ? EdgeInsets.only(left: 14.0, right: 14.0, top: 14.0, bottom: 14) : EdgeInsets.only(left: 30.0, right: 30.0, top: 14.0, bottom: 14),
? EdgeInsets.only(
left: 14.0, right: 14.0, top: 14.0, bottom: 14)
: EdgeInsets.only(
left: 30.0, right: 30.0, top: 14.0, bottom: 14),
decoration: BoxDecoration( decoration: BoxDecoration(
color: child != null color: child != null ? CustomColors.white : null,
? Theme.of(context).backgroundColor border: child != null ? Border.all(color: Theme.of(context).dividerColor, width: 2.0) : Border.all(color: Colors.transparent, width: 0.0),
: null, borderRadius: child != null ? BorderRadius.circular(16.0) : BorderRadius.circular(0.0),
border: child != null boxShadow: child != null ? [BoxShadow(color: Color.fromRGBO(0, 0, 0, 0.04), spreadRadius: -0.0, offset: Offset(0, 4.0), blurRadius: 18.0)] : []),
? Border.all(
color: Theme.of(context).dividerColor, width: 2.0)
: Border.all(color: Colors.transparent, width: 0.0),
borderRadius: child != null
? BorderRadius.circular(16.0)
: BorderRadius.circular(0.0),
boxShadow: child != null
? [
BoxShadow(
color: Color.fromRGBO(0, 0, 0, 0.04),
spreadRadius: -0.0,
offset: Offset(0, 4.0),
blurRadius: 18.0)
]
: []),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
if (child != null) if (child != null)
Padding( Padding(
padding: disabledPadding padding: disabledPadding
? EdgeInsets.only( ? EdgeInsets.only(left: 0.0, right: 0.0, top: 14.0, bottom: label != null ? 0.0 : 14)
left: 0.0, : EdgeInsets.only(left: 18.0, right: 18.0, top: 14.0, bottom: label != null ? 0.0 : 14),
right: 0.0,
top: 14.0,
bottom: label != null ? 0.0 : 14)
: EdgeInsets.only(
left: 18.0,
right: 18.0,
top: 14.0,
bottom: label != null ? 0.0 : 14),
child: child, child: child,
), ),
if (child != null) if (child != null)
@ -114,10 +67,7 @@ class BottomButton extends StatelessWidget {
label == null label == null
? SizedBox(height: 50.0) ? SizedBox(height: 50.0)
: Padding( : Padding(
padding: child != null padding: child != null ? EdgeInsets.only(bottom: 16.0, left: 16.0, right: 16.0) : EdgeInsets.zero,
? EdgeInsets.only(
bottom: 16.0, left: 16.0, right: 16.0)
: EdgeInsets.zero,
child: SecondaryButton( child: SecondaryButton(
borderColor: borderColor, borderColor: borderColor,
onTap: () { onTap: () {
@ -135,8 +85,7 @@ class BottomButton extends StatelessWidget {
), ),
if (label == null && child == null) if (label == null && child == null)
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(left: 30.0, right: 30.0, top: 14.0, bottom: 14),
left: 30.0, right: 30.0, top: 14.0, bottom: 14),
), ),
], ],
), ),

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
/// Flexible container widget /// Flexible container widget
/// [widthFactor] If non-null, the fraction of the incoming width given to the child. /// [widthFactor] If non-null, the fraction of the incoming width given to the child.
@ -33,7 +34,7 @@ class FlexibleContainer extends StatelessWidget {
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(8.0), borderRadius: BorderRadius.circular(8.0),
child: Material( child: Material(
color: Theme.of(context).backgroundColor, color: CustomColors.white,
child: Container( child: Container(
padding: padding, padding: padding,
width: double.infinity, width: double.infinity,

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -15,7 +16,8 @@ class ServicesContainer extends StatelessWidget {
height: 60, height: 60,
margin: EdgeInsets.all(8), margin: EdgeInsets.all(8),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).textTheme.headline2!.color, // color: Theme.of(context).textTheme.headline2!.color,
color: CustomColors.white,
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(7), borderRadius: BorderRadius.circular(7),
), ),

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -26,30 +27,31 @@ class Texts extends StatefulWidget {
final TextDecoration? decoration; final TextDecoration? decoration;
final double? heightFactor; final double? heightFactor;
Texts(this.text, Texts(
{Key? key, this.text, {
this.variant, Key? key,
this.color, this.variant,
this.bold, this.color,
this.regular, this.bold,
this.medium, this.regular,
this.allowExpand = true, this.medium,
this.italic= false, this.allowExpand = true,
this.textAlign, this.italic = false,
this.maxLength = 60, this.textAlign,
this.maxLines, this.maxLength = 60,
this.readMore = false, this.maxLines,
this.style, this.readMore = false,
this.fontSize, this.style,
this.fontWeight, this.fontSize,
this.margin, this.fontWeight,
this.marginBottom, this.margin,
this.marginLeft, this.marginBottom,
this.marginRight, this.marginLeft,
this.marginTop, this.marginRight,
this.decoration, this.marginTop,
this.heightFactor,}) this.decoration,
: super(key: key); this.heightFactor,
}) : super(key: key);
@override @override
_TextsState createState() => _TextsState(); _TextsState createState() => _TextsState();
@ -172,27 +174,28 @@ class _TextsState extends State<Texts> {
TextStyle? _getFontStyle() { TextStyle? _getFontStyle() {
switch (widget.style) { switch (widget.style) {
case "headline2": case "headline2":
return Theme.of(context).textTheme.headline2; // return Theme.of(context).textTheme.headline2;
return TextStyle(color: Colors.white);
case "headline3": case "headline3":
return Theme.of(context).textTheme.headline3; return TextStyle(color: Colors.white);
case "headline4": case "headline4":
return Theme.of(context).textTheme.headline4; return TextStyle(color: Colors.white);
case "headline5": case "headline5":
return Theme.of(context).textTheme.headline5; return TextStyle(color: Colors.white);
case "headline6": case "headline6":
return Theme.of(context).textTheme.headline6; return TextStyle(color: Colors.white);
case "bodyText2": case "bodyText2":
return Theme.of(context).textTheme.bodyText2; return TextStyle(color: Colors.white);
case "bodyText_15": case "bodyText_15":
return Theme.of(context).textTheme.bodyText2!.copyWith(fontSize: 15.0); return TextStyle(color: Colors.white, fontSize: 15.0);
case "bodyText1": case "bodyText1":
return Theme.of(context).textTheme.bodyText1; return TextStyle(color: Colors.white);
case "caption": case "caption":
return Theme.of(context).textTheme.caption; return TextStyle(color: Colors.white);
case "overline": case "overline":
return Theme.of(context).textTheme.overline; return TextStyle(color: Colors.white);
case "button": case "button":
return Theme.of(context).textTheme.button; return TextStyle(color: Colors.white);
default: default:
return TextStyle(); return TextStyle();
} }
@ -205,39 +208,25 @@ class _TextsState extends State<Texts> {
Stack( Stack(
children: <Widget>[ children: <Widget>[
Text( Text(
!hidden !hidden ? text : (text.substring(0, text.length > widget.maxLength! ? widget.maxLength : text.length)),
? text
: (text.substring(
0,
text.length > widget.maxLength!
? widget.maxLength
: text.length)),
textAlign: widget.textAlign, textAlign: widget.textAlign,
overflow: widget.maxLines != null overflow: widget.maxLines != null ? ((widget.maxLines! > 1) ? TextOverflow.fade : TextOverflow.ellipsis) : null,
? ((widget.maxLines! > 1)
? TextOverflow.fade
: TextOverflow.ellipsis)
: null,
maxLines: widget.maxLines ?? null, maxLines: widget.maxLines ?? null,
style: widget.style != null style: widget.style != null
? _getFontStyle()!.copyWith( ? _getFontStyle()!.copyWith(
fontStyle: widget.italic! ? FontStyle.italic : null, fontStyle: widget.italic! ? FontStyle.italic : null,
color: widget.color != null color: widget.color != null ? widget.color : Colors.black,
? widget.color
: Theme.of(context).textTheme.bodyText1!.color,
fontWeight: widget.fontWeight ?? _getFontWeight(), fontWeight: widget.fontWeight ?? _getFontWeight(),
) )
: TextStyle( : TextStyle(
height: widget.heightFactor, height: widget.heightFactor,
decoration: widget.decoration, decoration: widget.decoration,
fontStyle: widget.italic! ? FontStyle.italic : null, fontStyle: widget.italic! ? FontStyle.italic : null,
color: widget.color ?? color: widget.color ?? Colors.black,
Theme.of(context).textTheme.bodyText1!.color,
fontSize: widget.fontSize ?? _getFontSize(), fontSize: widget.fontSize ?? _getFontSize(),
letterSpacing: widget.variant == "overline" ? 1 : null, letterSpacing: widget.variant == "overline" ? 1 : null,
fontWeight: widget.fontWeight ?? _getFontWeight(), fontWeight: widget.fontWeight ?? _getFontWeight(),
fontFamily: fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
), ),
if (widget.readMore! && text.length > widget.maxLength! && hidden) if (widget.readMore! && text.length > widget.maxLength! && hidden)
Positioned( Positioned(
@ -247,8 +236,8 @@ class _TextsState extends State<Texts> {
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: LinearGradient(colors: [ gradient: LinearGradient(colors: [
Theme.of(context).backgroundColor, CustomColors.white,
Theme.of(context).backgroundColor.withOpacity(0), CustomColors.white.withOpacity(0),
], begin: Alignment.bottomCenter, end: Alignment.topCenter), ], begin: Alignment.bottomCenter, end: Alignment.topCenter),
), ),
height: 30.0, height: 30.0,
@ -256,9 +245,7 @@ class _TextsState extends State<Texts> {
) )
], ],
), ),
if (widget.allowExpand! && if (widget.allowExpand! && widget.readMore! && text.length > widget.maxLength!)
widget.readMore! &&
text.length > widget.maxLength!)
Padding( Padding(
padding: EdgeInsets.only(top: 8.0, right: 8.0, bottom: 8.0), padding: EdgeInsets.only(top: 8.0, right: 8.0, bottom: 8.0),
child: InkWell( child: InkWell(

@ -1,4 +1,5 @@
import 'dart:io' show Platform; import 'dart:io' show Platform;
import 'package:auto_size_text/auto_size_text.dart';
import 'package:barcode_scan2/barcode_scan2.dart'; import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
@ -144,17 +145,30 @@ class _AppDrawerState extends State<AppDrawer> {
(user != null && projectProvider!.isLogin) ? user!.firstName! + ' ' + user!.lastName! : TranslationBase.of(context).cantSeeProfile, (user != null && projectProvider!.isLogin) ? user!.firstName! + ' ' + user!.lastName! : TranslationBase.of(context).cantSeeProfile,
style: TextStyle(color: Color(0xff2E303A), fontWeight: FontWeight.bold, fontSize: 20, letterSpacing: -1.2, height: 35 / 20), style: TextStyle(color: Color(0xff2E303A), fontWeight: FontWeight.bold, fontSize: 20, letterSpacing: -1.2, height: 35 / 20),
), ),
Text( AutoSizeText(
(user != null && projectProvider!.isLogin) (user != null && projectProvider!.isLogin)
? TranslationBase.of(context).fileNumber + ": " + user!.patientID.toString() ? TranslationBase.of(context).fileNumber + ": " + user!.patientID.toString()
: TranslationBase.of(context).loginRegisterNow, : TranslationBase.of(context).loginRegisterNow,
maxLines: 1,
minFontSize: 10,
style: TextStyle( style: TextStyle(
color: Color(0xff2E303A), fontSize: SizeConfig.textMultiplier! * 1.6,
fontSize: 16, fontWeight: FontWeight.w600,
letterSpacing: -0.96, letterSpacing: -0.39,
height: 1, height: 0.8,
), ),
), ),
// Text(
// (user != null && projectProvider!.isLogin)
// ? TranslationBase.of(context).fileNumber + ": " + user!.patientID.toString()
// : TranslationBase.of(context).loginRegisterNow,
// style: TextStyle(
// color: Color(0xff2E303A),
// fontSize: 16,
// letterSpacing: -0.96,
// height: 1,
// ),
// ),
mHeight(20.0), mHeight(20.0),
(user != null && projectProvider!.isLogin) (user != null && projectProvider!.isLogin)
? Image.network("https://api.qrserver.com/v1/create-qr-code/?size=250x250&data=${user!.patientID.toString()}", fit: BoxFit.fill, height: 73.5, width: 73.5) ? Image.network("https://api.qrserver.com/v1/create-qr-code/?size=250x250&data=${user!.patientID.toString()}", fit: BoxFit.fill, height: 73.5, width: 73.5)
@ -204,8 +218,8 @@ class _AppDrawerState extends State<AppDrawer> {
child: DrawerItem(TranslationBase.of(context).family, SvgPicture.asset("assets/images/new/family_files.svg"), child: DrawerItem(TranslationBase.of(context).family, SvgPicture.asset("assets/images/new/family_files.svg"),
isImageIcon: true, isImageIcon: true,
bottomLine: false, bottomLine: false,
textColor: Theme.of(context).textTheme.bodyText1!.color, textColor: CustomColors.black,
iconColor: Theme.of(context).textTheme.bodyText1!.color, iconColor: CustomColors.black,
sideArrow: true, sideArrow: true,
letterSpacing: -0.84, letterSpacing: -0.84,
projectProvider: projectProvider), projectProvider: projectProvider),

@ -1,7 +1,9 @@
import 'dart:ui'; import 'dart:ui';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -52,7 +54,7 @@ class _DrawerItemState extends State<DrawerItem> {
? widget.icon ? widget.icon
: Icon( : Icon(
widget.icon, widget.icon,
color: widget.iconColor == null ? Theme.of(context).textTheme.bodyText1?.color : widget.iconColor, color: widget.iconColor == null ? CustomColors.black : widget.iconColor,
size: SizeConfig.imageSizeMultiplier! * 5, size: SizeConfig.imageSizeMultiplier! * 5,
)), )),
Expanded( Expanded(
@ -60,13 +62,24 @@ class _DrawerItemState extends State<DrawerItem> {
child: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ child: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
Row( Row(
children: [ children: [
AppText( AutoSizeText(
widget.title!, widget.title!,
fontWeight: FontWeight.w600, maxLines: 1,
fontSize: widget.fontSize, minFontSize: 10,
height: widget.fontHeight, style: TextStyle(
letterSpacing: widget.letterSpacing, fontSize: SizeConfig.textMultiplier! * 1.6,
fontWeight: FontWeight.w600,
letterSpacing: -0.39,
height: 0.8,
),
), ),
// AppText(
// widget.title!,
// fontWeight: FontWeight.w600,
// fontSize: widget.fontSize,
// height: widget.fontHeight,
// letterSpacing: widget.letterSpacing,
// ),
widget.count ?? SizedBox(), widget.count ?? SizedBox(),
], ],
), ),

@ -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/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 // static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS
@ -138,7 +138,7 @@ class MyInAppBrowser extends InAppBrowser {
openPackagesPaymentBrowser({required int customer_id, required int order_id}) { openPackagesPaymentBrowser({required int customer_id, required int order_id}) {
paymentType = _PAYMENT_TYPE.PACKAGES; paymentType = _PAYMENT_TYPE.PACKAGES;
var full_url = '$PACKAGES_REQUEST_PAYMENT_URL?customer_id=$customer_id&order_id=$order_id'; var full_url = '$PACKAGES_REQUEST_PAYMENT_URL?customer_id=$customer_id&order_id=$order_id';
this.openUrlRequest(urlRequest: URLRequest(url: Uri.parse(full_url)), options: _InAppBrowserOptions); this.openUrlRequest(urlRequest: URLRequest(url: WebUri.uri(Uri.parse(full_url))), options: _InAppBrowserOptions);
} }
openPaymentBrowser(num amount, String orderDesc, String transactionID, String projId, String emailId, String paymentMethod, dynamic patientType, String patientName, dynamic patientID, openPaymentBrowser(num amount, String orderDesc, String transactionID, String projId, String emailId, String paymentMethod, dynamic patientType, String patientName, dynamic patientID,
@ -190,7 +190,7 @@ class MyInAppBrowser extends InAppBrowser {
String url = "https://hmgwebservices.com/HMGApplePayLive/applepay/pay?apq=" + res['result']; // Prod String url = "https://hmgwebservices.com/HMGApplePayLive/applepay/pay?apq=" + res['result']; // Prod
// String url = "https://uat.hmgwebservices.com/HMGApplePayLive/applepay/pay?apq=" + res['result']; // UAT // String url = "https://uat.hmgwebservices.com/HMGApplePayLive/applepay/pay?apq=" + res['result']; // UAT
// safariBrowser.open(url: Uri.parse(url)); // safariBrowser.open(url: Uri.parse(url));
this.browser.openUrlRequest(urlRequest: URLRequest(url: Uri.parse(url)), options: _InAppBrowserOptions); this.browser.openUrlRequest(urlRequest: URLRequest(url: WebUri.uri(Uri.parse(url))), options: _InAppBrowserOptions);
}).catchError((err) { }).catchError((err) {
print(err); print(err);
if (context != null) GifLoaderDialogUtils.hideDialog(context); if (context != null) GifLoaderDialogUtils.hideDialog(context);
@ -233,7 +233,7 @@ class MyInAppBrowser extends InAppBrowser {
appoNo, clinicID, doctorID, "", installments) appoNo, clinicID, doctorID, "", installments)
.then((value) { .then((value) {
paymentType = _PAYMENT_TYPE.PATIENT; paymentType = _PAYMENT_TYPE.PATIENT;
this.browser.openUrlRequest(urlRequest: URLRequest(url: Uri.parse(value)), options: _InAppBrowserOptions); this.browser.openUrlRequest(urlRequest: URLRequest(url: WebUri.uri(Uri.parse(value))), options: _InAppBrowserOptions);
}); });
}).catchError((err) { }).catchError((err) {
print(err); print(err);
@ -245,7 +245,7 @@ class MyInAppBrowser extends InAppBrowser {
clinicID, doctorID) clinicID, doctorID)
.then((value) { .then((value) {
paymentType = _PAYMENT_TYPE.PATIENT; paymentType = _PAYMENT_TYPE.PATIENT;
this.browser.openUrlRequest(urlRequest: URLRequest(url: Uri.parse(value)), options: _InAppBrowserOptions); this.browser.openUrlRequest(urlRequest: URLRequest(url: WebUri.uri(Uri.parse(value))), options: _InAppBrowserOptions);
}); });
} }
} }
@ -258,16 +258,16 @@ class MyInAppBrowser extends InAppBrowser {
// getPatientData(); // getPatientData();
generatePharmacyURL(order, amount, orderDesc, transactionID, emailId, paymentMethod, patientName, patientID, authenticatedUser).then((value) { generatePharmacyURL(order, amount, orderDesc, transactionID, emailId, paymentMethod, patientName, patientID, authenticatedUser).then((value) {
if (order.customValuesXml!.contains("ApplePay")) { if (order.customValuesXml!.contains("ApplePay")) {
safariBrowser.open(url: Uri.parse(value)); safariBrowser.open(url: WebUri.uri(Uri.parse(value)));
} else { } else {
this.browser.openUrlRequest(urlRequest: URLRequest(url: Uri.parse(value)), options: _InAppBrowserOptions); this.browser.openUrlRequest(urlRequest: URLRequest(url: WebUri.uri(Uri.parse(value))), options: _InAppBrowserOptions);
} }
}); });
} }
openBrowser(String url) { openBrowser(String url) {
this.browser = browser; this.browser = browser;
this.browser.openUrlRequest(urlRequest: URLRequest(url: Uri.parse(url)), options: _InAppBrowserOptions); this.browser.openUrlRequest(urlRequest: URLRequest(url: WebUri.uri(Uri.parse(url))), options: _InAppBrowserOptions);
} }
Future<String> generateURL(num amount, String orderDesc, String transactionID, String projId, String emailId, String paymentMethod, dynamic patientType, String patientName, dynamic patientID, Future<String> generateURL(num amount, String orderDesc, String transactionID, String projId, String emailId, String paymentMethod, dynamic patientType, String patientName, dynamic patientID,
@ -489,7 +489,7 @@ class MyChromeSafariBrowser extends ChromeSafariBrowser {
} }
@override @override
void onCompletedInitialLoad() { void onCompletedInitialLoad(bool? didLoadSuccessfully) {
print("ChromeSafari browser initial load completed"); print("ChromeSafari browser initial load completed");
onLoadStartCallback!("ApplePay"); onLoadStartCallback!("ApplePay");
} }

@ -1,10 +1,10 @@
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
class NumberTextInputFormatter extends TextInputFormatter { class NumberTextInputFormatter extends TextInputFormatter {
@override @override
TextEditingValue formatEditUpdate( TextEditingValue formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) {
TextEditingValue oldValue, TextEditingValue newValue) {
final int newTextLength = newValue.text.length; final int newTextLength = newValue.text.length;
int selectionIndex = newValue.selection.end; int selectionIndex = newValue.selection.end;
int usedSubstringIndex = 0; int usedSubstringIndex = 0;
@ -26,8 +26,7 @@ class NumberTextInputFormatter extends TextInputFormatter {
if (newValue.selection.end >= 10) selectionIndex++; if (newValue.selection.end >= 10) selectionIndex++;
} }
// Dump the rest. // Dump the rest.
if (newTextLength >= usedSubstringIndex) if (newTextLength >= usedSubstringIndex) newText.write(newValue.text.substring(usedSubstringIndex));
newText.write(newValue.text.substring(usedSubstringIndex));
return TextEditingValue( return TextEditingValue(
text: newText.toString(), text: newText.toString(),
selection: TextSelection.collapsed(offset: selectionIndex), selection: TextSelection.collapsed(offset: selectionIndex),
@ -63,7 +62,7 @@ class TextFields extends StatefulWidget {
this.borderOnlyError = false, this.borderOnlyError = false,
this.onSaved, this.onSaved,
this.onSuffixTap, this.onSuffixTap,
this.readOnly= false, this.readOnly = false,
this.maxLength, this.maxLength,
this.prefixIcon, this.prefixIcon,
this.bare = false, this.bare = false,
@ -164,19 +163,14 @@ class _TextFieldsState extends State<TextFields> {
view = true; view = true;
}); });
}, },
child: Icon(Icons.remove_red_eye_sharp, child: Icon(Icons.remove_red_eye_sharp, size: 24.0, color: Colors.grey[500]),
size: 24.0, color: Colors.grey[500]),
), ),
); );
default: default:
if (widget.suffixIcon != null) if (widget.suffixIcon != null)
return InkWell( return InkWell(
onTap: widget.onSuffixTap, onTap: widget.onSuffixTap,
child: Icon(widget.suffixIcon, child: Icon(widget.suffixIcon, size: 22.0, color: widget.suffixIconColor != null ? widget.suffixIconColor : Colors.grey[500]),
size: 22.0,
color: widget.suffixIconColor != null
? widget.suffixIconColor
: Colors.grey[500]),
); );
else else
return SizedBox(); return SizedBox();
@ -203,10 +197,7 @@ class _TextFieldsState extends State<TextFields> {
// color: Color.fromRGBO(70, 68, 167, focus ? 0.20 : 0), // color: Color.fromRGBO(70, 68, 167, focus ? 0.20 : 0),
// offset: Offset(0.0, 13.0), // offset: Offset(0.0, 13.0),
// blurRadius: focus ? 34.0 : 12.0) // blurRadius: focus ? 34.0 : 12.0)
BoxShadow( BoxShadow(color: Color.fromRGBO(110, 68, 80, focus! ? 0.20 : 0), offset: Offset(0.0, 13.0), blurRadius: focus! ? 34.0 : 12.0)
color: Color.fromRGBO(110, 68, 80, focus! ? 0.20 : 0),
offset: Offset(0.0, 13.0),
blurRadius: focus! ? 34.0 : 12.0)
]), ]),
child: TextFormField( child: TextFormField(
keyboardAppearance: Theme.of(context).brightness, keyboardAppearance: Theme.of(context).brightness,
@ -234,10 +225,11 @@ class _TextFieldsState extends State<TextFields> {
autofocus: widget.autoFocus ?? false, autofocus: widget.autoFocus ?? false,
validator: widget.validator, validator: widget.validator,
onSaved: widget.onSaved, onSaved: widget.onSaved,
style: Theme.of(context) // style: Theme.of(context)
.textTheme // .textTheme
.bodyText1! // .bodyText1!
.copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight), // .copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight),
style: TextStyle(color: Colors.black, letterSpacing: 0.6, fontSize: widget.fontSize, fontWeight: widget.fontWeight),
inputFormatters: widget.keyboardType == TextInputType.phone inputFormatters: widget.keyboardType == TextInputType.phone
? <TextInputFormatter>[ ? <TextInputFormatter>[
FilteringTextInputFormatter.digitsOnly, FilteringTextInputFormatter.digitsOnly,
@ -252,41 +244,18 @@ class _TextFieldsState extends State<TextFields> {
fontWeight: widget.fontWeight, fontWeight: widget.fontWeight,
color: widget.hintColor ?? Theme.of(context).hintColor, color: widget.hintColor ?? Theme.of(context).hintColor,
), ),
contentPadding: widget.padding != null contentPadding: widget.padding != null ? widget.padding : EdgeInsets.symmetric(vertical: (widget.bare! && !widget.keepPadding!) ? 0.0 : 10.0, horizontal: 16.0),
? widget.padding
: EdgeInsets.symmetric(
vertical: (widget.bare! && !widget.keepPadding!) ? 0.0 : 10.0,
horizontal: 16.0),
filled: true, filled: true,
fillColor: widget.bare! fillColor: widget.bare! ? Colors.transparent : CustomColors.white,
? Colors.transparent
: Theme.of(context).backgroundColor,
suffixIcon: _buildSuffixIcon(), suffixIcon: _buildSuffixIcon(),
prefixIcon: widget.prefixIcon, prefixIcon: widget.prefixIcon,
errorStyle: TextStyle( errorStyle: TextStyle(fontSize: 14.0, fontWeight: widget.fontWeight, height: widget.borderOnlyError! ? 0.0 : null),
fontSize: 14.0,
fontWeight: widget.fontWeight,
height: widget.borderOnlyError! ? 0.0 : null),
errorBorder: OutlineInputBorder( errorBorder: OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(color: CustomColors.accentColor.withOpacity(widget.bare! ? 0.0 : 0.5), width: 1.0), borderRadius: BorderRadius.circular(widget.bare! ? 0.0 : 8.0)),
color: Theme.of(context)
.errorColor
.withOpacity(widget.bare! ? 0.0 : 0.5),
width: 1.0),
borderRadius: BorderRadius.circular(widget.bare! ? 0.0 : 8.0)),
focusedErrorBorder: OutlineInputBorder( focusedErrorBorder: OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(color: CustomColors.accentColor.withOpacity(widget.bare! ? 0.0 : 0.5), width: 1.0), borderRadius: BorderRadius.circular(widget.bare! ? 0.0 : 8.0)),
color: Theme.of(context) focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Colors.grey, width: 1.0), borderRadius: BorderRadius.circular(widget.bare! ? 0.0 : 8.0)),
.errorColor disabledBorder: OutlineInputBorder(borderSide: BorderSide(color: Colors.grey, width: 1.0), borderRadius: BorderRadius.circular(widget.bare! ? 0.0 : 8.0)),
.withOpacity(widget.bare! ? 0.0 : 0.5),
width: 1.0),
borderRadius: BorderRadius.circular(widget.bare! ? 0.0 : 8.0)),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.grey, width: 1.0),
borderRadius: BorderRadius.circular(widget.bare! ? 0.0 : 8.0)),
disabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.grey, width: 1.0),
borderRadius: BorderRadius.circular(widget.bare! ? 0.0 : 8.0)),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.grey, width: 1.0), borderSide: BorderSide(color: Colors.grey, width: 1.0),
borderRadius: BorderRadius.circular(widget.bare! ? 0.0 : 8.0), borderRadius: BorderRadius.circular(widget.bare! ? 0.0 : 8.0),

@ -494,7 +494,8 @@ class AppBarWidgetState extends State<AppBarWidget> {
// headline6: TextStyle(color: Theme.of(context).textTheme.headline1.color, fontWeight: FontWeight.bold), // headline6: TextStyle(color: Theme.of(context).textTheme.headline1.color, fontWeight: FontWeight.bold),
// ), // ),
title: Text(widget.authenticatedUserObject.isLogin || !widget.isShowDecPage ? widget.appBarTitle!.toUpperCase() : TranslationBase.of(context).serviceInformationTitle, title: Text(widget.authenticatedUserObject.isLogin || !widget.isShowDecPage ? widget.appBarTitle!.toUpperCase() : TranslationBase.of(context).serviceInformationTitle,
style: TextStyle(fontWeight: FontWeight.bold, color: Theme.of(context).textTheme.headline1!.color, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans')), // style: TextStyle(fontWeight: FontWeight.bold, color: Theme.of(context).textTheme.headline1!.color, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans')),
style: TextStyle(fontWeight: FontWeight.bold, color: CustomColors.white, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans')),
leading: Builder( leading: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return ArrowBack( return ArrowBack(

@ -125,207 +125,207 @@ class _NotAutPageState extends State<NotAutPage> {
), ),
); );
Scaffold( // Scaffold(
backgroundColor: Color(0xfff8f8f8), // backgroundColor: Color(0xfff8f8f8),
resizeToAvoidBottomInset: false, // resizeToAvoidBottomInset: false,
appBar: AppBar( // appBar: AppBar(
backgroundColor: Colors.transparent, // backgroundColor: Colors.transparent,
leading: IconButton( // leading: IconButton(
icon: Icon(Icons.arrow_back_ios), // icon: Icon(Icons.arrow_back_ios),
color: Color(0xff2B353E), // color: Color(0xff2B353E),
onPressed: () => Navigator.pop(context), // onPressed: () => Navigator.pop(context),
), // ),
), // ),
body: Padding( // body: Padding(
padding: EdgeInsets.only(bottom: 20, left: 21, right: 21), // padding: EdgeInsets.only(bottom: 20, left: 21, right: 21),
child: Column(children: [ // child: Column(children: [
Expanded( // Expanded(
child: ListView( // child: ListView(
padding: EdgeInsets.zero, // padding: EdgeInsets.zero,
physics: BouncingScrollPhysics(), // physics: BouncingScrollPhysics(),
children: [ // children: [
SizedBox(height: 12), // SizedBox(height: 12),
if (widget.icon != null) // if (widget.icon != null)
Align( // Align(
alignment: Alignment.centerLeft, // alignment: Alignment.centerLeft,
child: SvgPicture.asset( // child: SvgPicture.asset(
widget.icon!, // widget.icon!,
height: 35, // height: 35,
width: 35, // width: 35,
), // ),
), // ),
SizedBox(height: 16), // SizedBox(height: 16),
Text( // Text(
widget.title, // widget.title,
style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 23 / 24), // style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 23 / 24),
), // ),
Text( // Text(
widget.description!, // widget.description!,
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56, height: 21 / 14), // style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56, height: 21 / 14),
), // ),
SizedBox( // SizedBox(
height: 14, // height: 14,
), // ),
if (!projectViewModel.isInternetConnection) // if (!projectViewModel.isInternetConnection)
Center( // Center(
child: SizedBox( // child: SizedBox(
height: MediaQuery.of(context).size.height * 0.55, // height: MediaQuery.of(context).size.height * 0.55,
width: MediaQuery.of(context).size.width * 0.50, // width: MediaQuery.of(context).size.width * 0.50,
child: Image.asset(projectViewModel.isArabic ? 'assets/images/Wifi-AR.png' : 'assets/images/wifi-EN.png'), // child: Image.asset(projectViewModel.isArabic ? 'assets/images/Wifi-AR.png' : 'assets/images/wifi-EN.png'),
), // ),
), // ),
if (projectViewModel.isInternetConnection && widget.imagesInfo != null) // if (projectViewModel.isInternetConnection && widget.imagesInfo != null)
CarouselSlider( // CarouselSlider(
items: widget.imagesInfo?.map((image) { // items: widget.imagesInfo?.map((image) {
return Builder( // return Builder(
builder: (BuildContext context) { // builder: (BuildContext context) {
return SizedBox( // return SizedBox(
width: MediaQuery.of(context).size.width * 0.50, // width: MediaQuery.of(context).size.width * 0.50,
child: image.isAsset! ? Image.asset(projectViewModel.isArabic! ? image.imageAr! : image.imageEn!) : Image.network(projectViewModel.isArabic! ? image.imageAr! : image.imageEn!)); // child: image.isAsset! ? Image.asset(projectViewModel.isArabic! ? image.imageAr! : image.imageEn!) : Image.network(projectViewModel.isArabic! ? image.imageAr! : image.imageEn!));
}, // },
); // );
}).toList(), // }).toList(),
options: CarouselOptions( // options: CarouselOptions(
height: MediaQuery.of(context).size.height * 0.55, // height: MediaQuery.of(context).size.height * 0.55,
autoPlay: widget.imagesInfo!.length > 1, // autoPlay: widget.imagesInfo!.length > 1,
viewportFraction: 1.0, // viewportFraction: 1.0,
), // ),
), // ),
], // ],
), // ),
), // ),
SizedBox( // SizedBox(
height: 43, // height: 43,
width: double.infinity, // width: double.infinity,
child: TextButton( // child: TextButton(
onPressed: () { // onPressed: () {
loginCheck(context); // loginCheck(context);
}, // },
child: Text( // child: Text(
TranslationBase.of(context).loginregister, // TranslationBase.of(context).loginregister,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.48), // style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.48),
), // ),
style: TextButton.styleFrom( // style: TextButton.styleFrom(
backgroundColor: Color(0xffD02127), // backgroundColor: Color(0xffD02127),
shape: RoundedRectangleBorder( // shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6), // borderRadius: BorderRadius.circular(6),
), // ),
)), // )),
), // ),
]), // ]),
), // ),
); // );
//
return Scaffold( // return Scaffold(
body: SingleChildScrollView( // body: SingleChildScrollView(
padding: EdgeInsets.all(12), // padding: EdgeInsets.all(12),
child: Column( // child: Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ // children: <Widget>[
Texts( // Texts(
widget.title ?? 'Service', // widget.title ?? 'Service',
fontWeight: FontWeight.w800, // fontWeight: FontWeight.w800,
fontSize: 25, // fontSize: 25,
bold: true, // bold: true,
color: Color(0xff60686b), // color: Color(0xff60686b),
), // ),
SizedBox( // SizedBox(
height: 12, // height: 12,
), // ),
Texts( // Texts(
widget.description ?? 'Description', // widget.description ?? 'Description',
fontWeight: FontWeight.normal, // fontWeight: FontWeight.normal,
fontSize: 17, // fontSize: 17,
), // ),
if (widget.infoList != null) // if (widget.infoList != null)
SizedBox( // SizedBox(
height: 12, // height: 12,
), // ),
if (widget.infoList != null) // if (widget.infoList != null)
...List.generate( // ...List.generate(
widget.infoList!.length, // widget.infoList!.length,
(index) => Container( // (index) => Container(
child: Column( // child: Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ // children: [
Row( // Row(
children: [ // children: [
Container( // Container(
width: 40, // width: 40,
height: 40, // height: 40,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20), color: Theme.of(context).primaryColor), // decoration: BoxDecoration(borderRadius: BorderRadius.circular(20), color: Theme.of(context).primaryColor),
child: Center( // child: Center(
child: Texts( // child: Texts(
'${index + 1}', // '${index + 1}',
color: Colors.white, // color: Colors.white,
), // ),
), // ),
), // ),
SizedBox( // SizedBox(
width: 6, // width: 6,
), // ),
Expanded(child: Texts('${widget.infoList![index]}')) // Expanded(child: Texts('${widget.infoList![index]}'))
], // ],
), // ),
SizedBox( // SizedBox(
height: 12, // height: 12,
), // ),
], // ],
), // ),
), // ),
), // ),
SizedBox( // SizedBox(
height: 22, // height: 22,
), // ),
if (!projectViewModel.isInternetConnection) // if (!projectViewModel.isInternetConnection)
Center( // Center(
child: SizedBox( // child: SizedBox(
height: MediaQuery.of(context).size.height * 0.55, // height: MediaQuery.of(context).size.height * 0.55,
width: MediaQuery.of(context).size.width * 0.50, // width: MediaQuery.of(context).size.width * 0.50,
child: Image.asset(projectViewModel.isArabic ? 'assets/images/Wifi-AR.png' : 'assets/images/wifi-EN.png'), // child: Image.asset(projectViewModel.isArabic ? 'assets/images/Wifi-AR.png' : 'assets/images/wifi-EN.png'),
), // ),
), // ),
if (projectViewModel.isInternetConnection && widget.imagesInfo != null) // if (projectViewModel.isInternetConnection && widget.imagesInfo != null)
CarouselSlider( // CarouselSlider(
items: widget.imagesInfo!.map((image) { // items: widget.imagesInfo!.map((image) {
return Builder( // return Builder(
builder: (BuildContext context) { // builder: (BuildContext context) {
return SizedBox( // return SizedBox(
width: MediaQuery.of(context).size.width * 0.50, // width: MediaQuery.of(context).size.width * 0.50,
child: image.isAsset! ? Image.asset(projectViewModel.isArabic! ? image.imageAr! : image.imageEn!) : Image.network(projectViewModel.isArabic! ? image.imageAr! : image.imageEn!)); // child: image.isAsset! ? Image.asset(projectViewModel.isArabic! ? image.imageAr! : image.imageEn!) : Image.network(projectViewModel.isArabic! ? image.imageAr! : image.imageEn!));
}, // },
); // );
}).toList(), // }).toList(),
options: CarouselOptions( // options: CarouselOptions(
height: MediaQuery.of(context).size.height * 0.55, // height: MediaQuery.of(context).size.height * 0.55,
autoPlay: widget.imagesInfo!.length > 1, // autoPlay: widget.imagesInfo!.length > 1,
viewportFraction: 1.0, // viewportFraction: 1.0,
), // ),
), // ),
SizedBox( // SizedBox(
height: 77, // height: 77,
), // ),
], // ],
), // ),
), // ),
bottomSheet: Container( // bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10, // height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity, // width: double.infinity,
child: Column( // child: Column(
children: <Widget>[ // children: <Widget>[
Container( // Container(
width: MediaQuery.of(context).size.width * 0.9, // width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton( // child: SecondaryButton(
onTap: () { // onTap: () {
loginCheck(context); // loginCheck(context);
}, // },
label: TranslationBase.of(context).serviceInformationButton, // label: TranslationBase.of(context).serviceInformationButton,
textColor: Theme.of(context).backgroundColor), // textColor: Theme.of(context).backgroundColor),
), // ),
], // ],
), // ),
), // ),
); // );
} }
loginCheck(context) async { loginCheck(context) async {

@ -3,6 +3,7 @@ import 'dart:io';
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart'; import 'package:flutter_svg/svg.dart';
@ -211,12 +212,12 @@ class SMSOTP {
errorBorder: OutlineInputBorder( errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)), borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Theme.of(context).errorColor), borderSide: BorderSide(color: CustomColors.accentColor),
), ),
focusedErrorBorder: OutlineInputBorder( focusedErrorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)), borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Theme.of(context).errorColor), borderSide: BorderSide(color: CustomColors.accentColor),
), ),
); );
} }

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -62,7 +63,7 @@ class _AppTextState extends State<AppText> {
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
color: widget.color == null ? Theme.of(context).textTheme.bodyText1!.color : widget.color, color: widget.color == null ? CustomColors.black : widget.color,
fontWeight: widget.fontWeight, fontWeight: widget.fontWeight,
fontSize: widget.fontSize ?? (SizeConfig.textMultiplier! * 2), fontSize: widget.fontSize ?? (SizeConfig.textMultiplier! * 2),
height: widget.height, height: widget.height,

@ -1,7 +1,7 @@
name: diplomaticquarterapp name: diplomaticquarterapp
description: A new Flutter application. description: A new Flutter application.
version: 4.5.061+4050061 version: 4.5.063+4050063
environment: environment:
sdk: ">=3.0.0 <3.13.0" sdk: ">=3.0.0 <3.13.0"
@ -13,9 +13,11 @@ dependencies:
# Localizations # Localizations
flutter_localizations: flutter_localizations:
sdk: flutter sdk: flutter
intl: ^0.18.1 # intl: ^0.18.1
intl: ^0.19.0
webview_flutter: ^2.0.4 # webview_flutter: ^2.0.4
webview_flutter: ^4.8.0
# http client # http client
http: ^0.13.4 http: ^0.13.4
@ -97,7 +99,8 @@ dependencies:
flutter_rating_bar: ^4.0.1 flutter_rating_bar: ^4.0.1
# Calendar # Calendar
syncfusion_flutter_calendar: ^23.1.42 # syncfusion_flutter_calendar: ^23.1.42
syncfusion_flutter_calendar: ^24.1.47
# SVG Images # SVG Images
flutter_svg: ^2.0.8 flutter_svg: ^2.0.8
@ -106,7 +109,7 @@ dependencies:
manage_calendar_events: ^2.0.3 manage_calendar_events: ^2.0.3
#InAppBrowser #InAppBrowser
flutter_inappwebview: ^5.8.0 flutter_inappwebview: ^6.1.0+1
#Circular progress bar for reverse timer #Circular progress bar for reverse timer
circular_countdown_timer: ^0.2.0 circular_countdown_timer: ^0.2.0
@ -132,9 +135,9 @@ dependencies:
google_maps_place_picker_mb: ^3.0.0 google_maps_place_picker_mb: ^3.0.0
map_launcher: ^3.0.1 map_launcher: ^3.0.1
flutter_countdown_timer: ^4.1.0 flutter_countdown_timer: ^4.1.0
carousel_slider: ^5.0.0
#Dependencies for video call implementation #Dependencies for video call implementation
native_device_orientation: ^1.0.0 native_device_orientation: ^1.0.0
wakelock: ^0.6.2
after_layout: ^1.1.0 after_layout: ^1.1.0
cached_network_image: ^3.3.0 cached_network_image: ^3.3.0
flutter_tts: ^3.6.1 flutter_tts: ^3.6.1
@ -150,14 +153,14 @@ dependencies:
badges: ^3.1.2 badges: ^3.1.2
flutter_app_icon_badge: ^2.0.0 flutter_app_icon_badge: ^2.0.0
# dropdown_search: 5.0.6 # dropdown_search: 5.0.6
youtube_player_flutter: ^8.1.2 youtube_player_flutter: ^9.1.0
# shimmer: ^3.0.0 # shimmer: ^3.0.0
carousel_slider: ^4.0.0 # carousel_slider: ^4.0.0
# flutter_staggered_grid_view: ^0.7.0 # flutter_staggered_grid_view: ^0.7.0
huawei_hmsavailability: ^6.11.0+301 huawei_hmsavailability: ^6.11.0+301
huawei_location: ^6.11.0+301 huawei_location: ^6.11.0+301
share_plus: ^6.3.4 share_plus: ^10.0.2
# Marker Animation # Marker Animation
auto_size_text: ^3.0.0 auto_size_text: ^3.0.0
equatable: ^2.0.3 equatable: ^2.0.3
@ -167,12 +170,15 @@ dependencies:
google_api_availability: ^5.0.0 google_api_availability: ^5.0.0
open_filex: ^4.3.2 open_filex: ^4.3.2
path_provider: ^2.0.8 path_provider: ^2.0.8
amazon_payfort: ^1.1.0 amazon_payfort: ^1.1.3
logger: ^2.0.2+1 logger: ^2.0.2+1
network_info_plus: any network_info_plus: any
flutter_zoom_videosdk: ^1.10.11 flutter_zoom_videosdk: ^1.11.2
dart_jsonwebtoken: ^2.14.0 dart_jsonwebtoken: ^2.14.0
win32: ^5.5.4
cloudflare_turnstile: ^2.0.1
dependency_overrides: dependency_overrides:

Loading…
Cancel
Save