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

# Conflicts:
#	lib/config/localized_values.dart
#	lib/uitl/translations_delegate_base.dart
merge-update-with-lab-changes
Aamir.Muhammad 1 year ago
commit e045c375d2

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

@ -599,7 +599,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 4.5.93;
MARKETING_VERSION = 4.5.95;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -749,7 +749,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 4.5.93;
MARKETING_VERSION = 4.5.95;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -791,7 +791,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 4.5.93;
MARKETING_VERSION = 4.5.95;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

@ -33,7 +33,7 @@ var BASE_URL = 'https://uat.hmgwebservices.com/';
// 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 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 GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 15.9;
var VERSION_ID = 16.3;
var SETUP_ID = '91877';
var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0;
@ -668,10 +668,10 @@ var GET_DENTAL_INSTRUCTIONS = 'Services/OUTPs.svc/Rest/getProcedureNotification'
//PAYFORT
var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails";
var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse";
var payFortEnvironment = FortEnvironment.production;
var applePayMerchantId = "merchant.com.hmgwebservices";
// var payFortEnvironment = FortEnvironment.test;
// var applePayMerchantId = "merchant.com.hmgwebservices.uat";
// var payFortEnvironment = FortEnvironment.production;
// var applePayMerchantId = "merchant.com.hmgwebservices";
var payFortEnvironment = FortEnvironment.test;
var applePayMerchantId = "merchant.com.hmgwebservices.uat";
class AppGlobal {
static var context;

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

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

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

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

@ -100,7 +100,7 @@ class ConfirmDialog extends StatelessWidget {
onClick();
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/viewModels/all_habib_medical_services/e_referral_view_model.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/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -367,11 +368,11 @@ class _EReferralConfirmSMSDialogState extends State<EReferralConfirmSMSDialog> {
),
errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(5.0)),
borderSide: BorderSide(color: Theme.of(context).errorColor),
borderSide: BorderSide(color: CustomColors.accentColor),
),
focusedErrorBorder: OutlineInputBorder(
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/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -36,9 +37,7 @@ class HomeHealthCareIndexPage extends StatelessWidget {
SizedBox(
height: 22,
),
Center(
child: Image.asset(
'assets/images/AlHabibMedicalService/Wifi-AR.png')),
Center(child: Image.asset('assets/images/AlHabibMedicalService/Wifi-AR.png')),
SizedBox(
height: 77,
),
@ -53,13 +52,13 @@ class HomeHealthCareIndexPage extends StatelessWidget {
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
onTap: () => Navigator.push(
context,
FadePage(
page: HomeHealthCarePage(),
),
),
context,
FadePage(
page: HomeHealthCarePage(),
),
),
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,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString());
},

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

@ -4,31 +4,57 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
class MyWebView extends StatelessWidget {
class MyWebView extends StatefulWidget {
final String title;
final String selectedUrl;
final Completer<WebViewController> _controller = Completer<WebViewController>();
MyWebView({
required this.title,
required this.selectedUrl,
});
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: title,
isShowDecPage: false,
showNewAppBar: true,
showNewAppBarTitle: true,
body: WebView(
initialUrl: selectedUrl,
javascriptMode: JavascriptMode.unrestricted,
onWebViewCreated: (WebViewController webViewController) {
_controller.complete(webViewController);
State<MyWebView> createState() => _MyWebViewState();
}
class _MyWebViewState extends State<MyWebView> {
// final Completer<WebViewController> _controller = Completer<WebViewController>();
late final WebViewController _controller;
@override
void initState() {
super.initState();
_controller = 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);
service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, AppGlobal.context).then((res) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
print(res);
navigateToHome(AppGlobal.context);
}).catchError((err) {
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/project_view_model.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/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
@ -350,11 +351,11 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
),
errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(5.0)),
borderSide: BorderSide(color: Theme.of(context).errorColor),
borderSide: BorderSide(color: CustomColors.accentColor),
),
focusedErrorBorder: OutlineInputBorder(
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/material.dart';
import 'package:flutter/services.dart';
@ -183,7 +184,8 @@ class _NewTextFieldsState extends State<NewTextFields> {
validator: widget.validator,
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
? <TextInputFormatter>[
FilteringTextInputFormatter.digitsOnly,
@ -193,8 +195,8 @@ class _NewTextFieldsState extends State<NewTextFields> {
decoration: InputDecoration(
labelText: widget.hintText,
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)),
focusedErrorBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).errorColor.withOpacity(0.5), width: 1.0), borderRadius: BorderRadius.circular(8.0)),
errorBorder: OutlineInputBorder(borderSide: BorderSide(color: CustomColors.accentColor.withOpacity(0.5), width: 1.0), borderRadius: BorderRadius.circular(12.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)),
disabledBorder: OutlineInputBorder(borderSide: BorderSide(color: Colors.white, width: 1.0), borderRadius: BorderRadius.circular(12)),
enabledBorder: OutlineInputBorder(

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

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

@ -1,6 +1,8 @@
import "dart:collection";
import 'package:auto_size_text/auto_size_text.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/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
@ -73,7 +75,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
super.initState();
}
void checkPVM(){
void checkPVM() {
if (context.read<ProjectViewModel>().isLogin) {
if (radioValue == null) {
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.selection = TextSelection.fromPosition(TextPosition(offset: ageController.text.length));
}
}
@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) {
return DropdownMenuItem<HospitalsModel>(
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(),
onChanged: (HospitalsModel? newValue) async {
@ -650,7 +673,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
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/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
@ -79,7 +82,7 @@ class _ClickListDialogState extends State<ClickListDialog> {
},
decoration: InputDecoration(
hintStyle: TextStyle(fontSize: 17),
hintText: 'Search Clinic',
hintText: TranslationBase.of(context).searchClinic,
suffixIcon: Icon(Icons.search),
border: InputBorder.none,
contentPadding: EdgeInsets.all(12),
@ -99,7 +102,19 @@ class _ClickListDialogState extends State<ClickListDialog> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
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!
? SvgPicture.asset(
'assets/images/new-design/video_icon_green_right.svg',

@ -36,7 +36,7 @@ class DoctorView extends StatefulWidget {
DoctorView(
{required this.doctor,
this.isLiveCareAppointment,
this.isLiveCareAppointment,
this.isObGyneAppointment = false,
this.isDoctorNameSearch = false,
this.isContinueDentalPlan = false,
@ -50,7 +50,6 @@ class DoctorView extends StatefulWidget {
}
class _DoctorViewState extends State<DoctorView> with AutomaticKeepAliveClientMixin {
late ProjectViewModel projectViewModel;
@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),
),
),
widget.isShowDate ? Text(
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.doctor.date)),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
) : Container(),
widget.isShowDate
? Text(
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.doctor.date)),
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),
@ -123,12 +124,20 @@ class _DoctorViewState extends State<DoctorView> with AutomaticKeepAliveClientMi
children: <Widget>[
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.speciality != null && widget.doctor.speciality!.length > 0)
Text(
this.widget.doctor.speciality![0].trim(),
// 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.speciality != null && widget.doctor.speciality!.length > 0)
Text(
this.widget.doctor.speciality![0].trim(),
// 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)
Text(
getDate(widget.doctor.nearestFreeSlot),
@ -147,9 +156,18 @@ class _DoctorViewState extends State<DoctorView> with AutomaticKeepAliveClientMi
itemSize: 20,
ignoreGestures: true,
ratingWidget: RatingWidget(
full: Icon(Icons.star, color: CustomColors.accentColor,),
half: Icon(Icons.star_half, color: CustomColors.accentColor,),
empty: Icon(Icons.star, color: CustomColors.accentColor,),
full: Icon(
Icons.star,
color: CustomColors.accentColor,
),
half: Icon(
Icons.star_half,
color: CustomColors.accentColor,
),
empty: Icon(
Icons.star,
color: CustomColors.accentColor,
),
),
tapOnlyMode: true,
itemPadding: EdgeInsets.symmetric(horizontal: 4.0),
@ -267,8 +285,14 @@ class _DoctorViewState extends State<DoctorView> with AutomaticKeepAliveClientMi
}
void next(BuildContext context) {
Navigator.push(context,
FadePage(page: ObGyneTimeSlots(projectID: widget.doctor.projectID!, selectedClinicID: widget.doctor.clinicID!, selectedDoctorID: widget.doctor.doctorID!, obGyneProcedureListResponse: widget.obGyneProcedureListResponse!)));
Navigator.push(
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 {

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

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

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

@ -15,6 +15,7 @@ import 'package:diplomaticquarterapp/models/LiveCare/LiveCareClinicsListResponse
import 'package:diplomaticquarterapp/models/LiveCare/LiveCareScheduleClinicsListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.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/livecare/livecare_home.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) {
int languageID = projectViewModel.isArabic ? 1 : 2;
String errorMsg = "";
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service.getERAppointmentTime(selectedClinicID, widget.isPharmacyLiveCare, languageID, context).then((res) {
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) {
GifLoaderDialogUtils.hideDialog(context);
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) {
navigateTo(
context,
@ -413,28 +464,28 @@ class _clinic_listState extends State<ClinicList> {
service.applePayInsertRequest(applePayInsertRequest, localContext!).then((res) async {
if (res["MessageStatus"] == 1) {
await localContext!.read<PayfortViewModel>().initiateApplePayWithPayfort(
customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
orderDescription: "LiveCare Payment",
orderAmount: double.parse(amount),
merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}");
GifLoaderDialogUtils.hideDialog(localContext!);
AppToast.showErrorToast(message: failureResult.toString());
},
onSuccess: (successResult) async {
GifLoaderDialogUtils.hideDialog(localContext!);
log("Payfort: ${successResult.responseMessage}");
await localContext!.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult);
checkPaymentStatus(appo);
},
projectId: appo.projectID,
serviceTypeEnum: ServiceTypeEnum.appointmentPayment,
);
customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
orderDescription: "LiveCare Payment",
orderAmount: double.parse(amount),
merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}");
GifLoaderDialogUtils.hideDialog(localContext!);
AppToast.showErrorToast(message: failureResult.toString());
},
onSuccess: (successResult) async {
GifLoaderDialogUtils.hideDialog(localContext!);
log("Payfort: ${successResult.responseMessage}");
await localContext!.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult);
checkPaymentStatus(appo);
},
projectId: appo.projectID,
serviceTypeEnum: ServiceTypeEnum.appointmentPayment,
);
} else {
GifLoaderDialogUtils.hideDialog(context);
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:local_auth/local_auth.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 {
final Function? changePageViewIndex;
@ -552,11 +552,11 @@ class _ConfirmLogin extends State<ConfirmLogin> {
stickyAuth: true,
),
authMessages: [
IOSAuthMessages(
cancelButton: 'cancel',
goToSettingsButton: 'settings',
goToSettingsDescription: 'Please set up your Touch ID.',
lockOut: 'Please reenable your Touch ID'),
// IOSAuthMessages(
// cancelButton: 'cancel',
// goToSettingsButton: 'settings',
// goToSettingsDescription: 'Please set up your Touch ID.',
// lockOut: 'Please reenable your Touch ID'),
],
);
} 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/config/config.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
@ -27,6 +29,23 @@ class _ForgotPassword extends State<ForgotPassword> {
String mobileNo = "";
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
Widget build(BuildContext context) {
con = context;
@ -66,6 +85,25 @@ class _ForgotPassword extends State<ForgotPassword> {
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
request = getTempUserRequest();
GifLoaderDialogUtils.showMyDialog(context);
GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false);
dynamic res;
this
.authService
@ -480,7 +480,7 @@ class _RegisterInfo extends State<RegisterInfo> {
sharedPref.remove(FAMILY_FILE),
result.list.isFamily = false,
sharedPref.setString(BLOOD_TYPE, result.patientBloodType),
sharedPref.setString(BLOOD_TYPE, result.patientBloodType ?? ""),
authenticatedUserObject.user = result.list,
projectViewModel.setPrivilege(privilegeList: res),
sharedPref.setObject(MAIN_USER, result.list),

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

@ -329,6 +329,7 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${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) {
DoctorsListService service = new DoctorsListService();
service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, AppGlobal.context).then((res) {
print(res);
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
navigateToHome(AppGlobal.context);
}).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/viewModels/medical/my_balance_view_model.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/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
@ -363,11 +364,11 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
),
errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(5.0)),
borderSide: BorderSide(color: Theme.of(context).errorColor),
borderSide: BorderSide(color: CustomColors.accentColor),
),
focusedErrorBorder: OutlineInputBorder(
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/material.dart';
import 'package:flutter/services.dart';
@ -184,7 +185,8 @@ class _NewTextFieldsState extends State<NewTextFields> {
autofocus: widget.autoFocus ?? false,
validator: widget.validator,
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
? <TextInputFormatter>[
FilteringTextInputFormatter.digitsOnly,
@ -194,9 +196,9 @@ class _NewTextFieldsState extends State<NewTextFields> {
decoration: InputDecoration(
labelText: widget.hintText,
counterText: widget.counterText,
labelStyle: TextStyle(color: Theme.of(context).textTheme.bodyText1!.color),
errorBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).errorColor.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)),
labelStyle: TextStyle(color: Colors.black),
errorBorder: OutlineInputBorder(borderSide: BorderSide(color: CustomColors.accentColor.withOpacity(0.5), width: 1.0), borderRadius: BorderRadius.circular(12.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)),
disabledBorder: OutlineInputBorder(borderSide: BorderSide(color: Colors.white, width: 1.0), borderRadius: BorderRadius.circular(12)),
enabledBorder: OutlineInputBorder(

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

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

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

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

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

@ -95,7 +95,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
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)),
projectViewModel.isArabic),
],

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

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

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

@ -76,7 +76,8 @@ class AppSharedPreferences {
final SharedPreferences prefs = await _prefs;
await prefs.reload();
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

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

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

@ -831,7 +831,8 @@ class Utils {
children: [
SizedBox(height: 12),
Text(
isCapitable && !projectViewModel.isArabic ? text.toLowerCase().capitalizeFirstofEach : text,
// isCapitable && !projectViewModel.isArabic ? text.toLowerCase().capitalizeFirstofEach : text,
text,
maxLines: 2,
overflow: TextOverflow.ellipsis,
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
void _updateWidth() {
final theme = Theme.of(context);
final fontSize = theme.textTheme.button!.fontSize;
// final fontSize = theme.textTheme.button!.fontSize;
final fontSize = 12.0;
final renderParagraph = RenderParagraph(
TextSpan(
text: widget.text,
style: TextStyle(
fontSize: fontSize,
fontWeight: theme.textTheme.button!.fontWeight,
letterSpacing: theme.textTheme.button!.letterSpacing,
fontWeight: FontWeight.normal,
letterSpacing: 0.6,
),
),
textDirection: TextDirection.ltr,

@ -3,6 +3,7 @@ import 'dart:io';
import 'package:diplomaticquarterapp/config/config.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/utils.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -122,7 +123,7 @@ class _BottomSheet extends StatelessWidget {
Widget build(BuildContext context) {
return Container(
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(
top: false,
child: Column(
@ -165,14 +166,14 @@ class _BottomSheetItem extends StatelessWidget {
if (icon != null)
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,
),
if (icon != null) SizedBox(width: 24.0),
Texts(
title ?? "",
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:flutter/material.dart';
@ -23,18 +24,7 @@ class BottomButton extends StatelessWidget {
final Widget? child;
final bool disabledPadding;
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})
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})
: super(key: key);
@override
@ -44,17 +34,7 @@ class BottomButton extends StatelessWidget {
children: <Widget>[
Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
stops: [
0.0,
0.9
],
colors: [
Theme.of(context).backgroundColor,
Theme.of(context).backgroundColor.withOpacity(0)
]),
gradient: LinearGradient(begin: Alignment.bottomCenter, end: Alignment.topCenter, stops: [0.0, 0.9], colors: [CustomColors.white, CustomColors.white.withOpacity(0)]),
),
alignment: Alignment.center,
child: SafeArea(
@ -63,46 +43,19 @@ class BottomButton extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
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),
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),
decoration: BoxDecoration(
color: child != null
? Theme.of(context).backgroundColor
: null,
border: child != null
? 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)
]
: []),
color: child != null ? CustomColors.white : null,
border: child != null ? 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(
children: <Widget>[
if (child != null)
Padding(
padding: disabledPadding
? EdgeInsets.only(
left: 0.0,
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),
? EdgeInsets.only(left: 0.0, 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,
),
if (child != null)
@ -114,10 +67,7 @@ class BottomButton extends StatelessWidget {
label == null
? SizedBox(height: 50.0)
: Padding(
padding: child != null
? EdgeInsets.only(
bottom: 16.0, left: 16.0, right: 16.0)
: EdgeInsets.zero,
padding: child != null ? EdgeInsets.only(bottom: 16.0, left: 16.0, right: 16.0) : EdgeInsets.zero,
child: SecondaryButton(
borderColor: borderColor,
onTap: () {
@ -135,8 +85,7 @@ class BottomButton extends StatelessWidget {
),
if (label == null && child == null)
Padding(
padding: EdgeInsets.only(
left: 30.0, right: 30.0, top: 14.0, bottom: 14),
padding: EdgeInsets.only(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';
/// Flexible container widget
/// [widthFactor] If non-null, the fraction of the incoming width given to the child.
@ -33,7 +34,7 @@ class FlexibleContainer extends StatelessWidget {
child: ClipRRect(
borderRadius: BorderRadius.circular(8.0),
child: Material(
color: Theme.of(context).backgroundColor,
color: CustomColors.white,
child: Container(
padding: padding,
width: double.infinity,

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

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

@ -1,4 +1,5 @@
import 'dart:io' show Platform;
import 'package:auto_size_text/auto_size_text.dart';
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.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,
style: TextStyle(color: Color(0xff2E303A), fontWeight: FontWeight.bold, fontSize: 20, letterSpacing: -1.2, height: 35 / 20),
),
Text(
AutoSizeText(
(user != null && projectProvider!.isLogin)
? TranslationBase.of(context).fileNumber + ": " + user!.patientID.toString()
: TranslationBase.of(context).loginRegisterNow,
maxLines: 1,
minFontSize: 10,
style: TextStyle(
color: Color(0xff2E303A),
fontSize: 16,
letterSpacing: -0.96,
height: 1,
fontSize: SizeConfig.textMultiplier! * 1.6,
fontWeight: FontWeight.w600,
letterSpacing: -0.39,
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),
(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)
@ -204,8 +218,8 @@ class _AppDrawerState extends State<AppDrawer> {
child: DrawerItem(TranslationBase.of(context).family, SvgPicture.asset("assets/images/new/family_files.svg"),
isImageIcon: true,
bottomLine: false,
textColor: Theme.of(context).textTheme.bodyText1!.color,
iconColor: Theme.of(context).textTheme.bodyText1!.color,
textColor: CustomColors.black,
iconColor: CustomColors.black,
sideArrow: true,
letterSpacing: -0.84,
projectProvider: projectProvider),

@ -1,7 +1,9 @@
import 'dart:ui';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/config/size_config.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:flutter/material.dart';
@ -52,7 +54,7 @@ class _DrawerItemState extends State<DrawerItem> {
? widget.icon
: 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,
)),
Expanded(
@ -60,13 +62,24 @@ class _DrawerItemState extends State<DrawerItem> {
child: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
Row(
children: [
AppText(
AutoSizeText(
widget.title!,
fontWeight: FontWeight.w600,
fontSize: widget.fontSize,
height: widget.fontHeight,
letterSpacing: widget.letterSpacing,
maxLines: 1,
minFontSize: 10,
style: TextStyle(
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(),
],
),

@ -38,9 +38,9 @@ class MyInAppBrowser extends InAppBrowser {
static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE
// static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// static String SERVICE_URL = 'https://hmgwebservices.com/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

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

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

@ -3,6 +3,7 @@ import 'dart:io';
import 'package:diplomaticquarterapp/config/size_config.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:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
@ -211,12 +212,12 @@ class SMSOTP {
errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Theme.of(context).errorColor),
borderSide: BorderSide(color: CustomColors.accentColor),
),
focusedErrorBorder: OutlineInputBorder(
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/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -62,7 +63,7 @@ class _AppTextState extends State<AppText> {
overflow: TextOverflow.clip,
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,
fontSize: widget.fontSize ?? (SizeConfig.textMultiplier! * 2),
height: widget.height,

@ -1,7 +1,7 @@
name: diplomaticquarterapp
description: A new Flutter application.
version: 4.5.061+4050061
version: 4.5.063+4050063
environment:
sdk: ">=3.0.0 <3.13.0"
@ -13,9 +13,11 @@ dependencies:
# Localizations
flutter_localizations:
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: ^0.13.4
@ -97,7 +99,8 @@ dependencies:
flutter_rating_bar: ^4.0.1
# Calendar
syncfusion_flutter_calendar: ^23.1.42
# syncfusion_flutter_calendar: ^23.1.42
syncfusion_flutter_calendar: ^24.1.47
# SVG Images
flutter_svg: ^2.0.8
@ -174,6 +177,8 @@ dependencies:
flutter_zoom_videosdk: ^1.10.11
dart_jsonwebtoken: ^2.14.0
cloudflare_turnstile: ^2.0.1
dependency_overrides:
dev_dependencies:

Loading…
Cancel
Save