Merge branch 'development' into enad_pharmacy2

enad_pharmacy2
enadhilal 5 years ago
commit de4af313fa

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

@ -12,8 +12,8 @@ const EXA_CART_API_BASE_URL = 'https://mdlaboratories.com/exacartapi';
const PACKAGES_CATEGORIES = '/api/categories';
const PACKAGES_PRODUCTS = '/api/products';
const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/';
//const BASE_PHARMACY_URL = 'http://swd-pharapp-01:7200/api/';
const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
@ -189,6 +189,8 @@ const HIS_CREATE_ADVANCE_PAYMENT = "Services/Patients.svc/REST/HIS_CreateAdvance
const ADD_ADVANCE_NUMBER_REQUEST = 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest';
const ADD_VIDA_REQUEST = 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart';
const IS_ALLOW_ASK_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_CALL_REQUEST_TYPE = 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo';
@ -398,7 +400,9 @@ const GET_PARENT_PRODUCTS = 'products?categoryid=';
const GET_SUB_CATEGORISE = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=';
const GET_SUB_PRODUCTS = 'products?categoryid=';
const GET_FINAL_PRODUCTS =
'products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId=';
'products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId=';const GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory';
const GET_DISEASE_BY_CLINIC_ID = 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID';
const SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime';
const TIMER_MIN = 10;

@ -606,7 +606,7 @@ const Map localizedValues = {
"HHCNotAuthMsg": {
"en":
"This service provides a set of home health care services, continuous and comprehensive follow-up in their places of residence for those who cannot access health facilities, such as (laboratory analyzes - radiology - vaccinations - physical therapy), etc.",
"ar": "من خلال هذه الخدمة يمكنك طلب مجموعة من الفحوصات التي تساعدك وتساعد طبيبك في فهم حالتك الصحية الحالية ومن ثم تحديد المخاطر المحتملة"
"ar": "توفر هذه الخدمة مجموعه من خدمات الرعايه الصحيه المنزلية و متابعه مستمره وشامله للذين لا يستطيعون الوصول للمنشات الصحيه في اماكن اقامتهم (التحاليل المخبرية الاشعة التطعيمات العلاج الطبيعي)..."
},
"email": {"en": "Email", "ar": "البريد الالكتروني"},
"Book": {"en": "Book", "ar": "احجز"},
@ -1142,10 +1142,55 @@ const Map localizedValues = {
"en": "Enter the required information, In order to register for Blood Donation Service",
"ar": "أدخل المعلومات المطلوبة ، للتسجيل في خدمة التبرع بالدم"
},
"viewTermsConditions": {"en": "To view the terms and conditions", "ar": "لعرض الشروط والأحكام"},
"WalkinAppo": {"en": "Hospital Visit Appointment", "ar": "موعد زيارة للمستشفى"},
"videoAppo": {"en": "Video Call Appointment", "ar": "موعد اتصال فيديو"},
// "visit": {"en" : "Visit", "ar": "الزيارة"},
"viewTermsConditions": {
"en": "To view the terms and conditions",
"ar": "لعرض الشروط والأحكام"
},
"WalkinAppo": {
"en": "Hospital Visit Appointment",
"ar": "موعد زيارة للمستشفى"
},
"videoAppo": {
"en": "Video Call Appointment",
"ar": "موعد اتصال فيديو"
},
"generalHealth": {"en": "General Health", "ar": "صحة عامة"},
"womanHealth": {"en": "Women's Health", "ar": "صحة المرأة"},
"bmi": {"en": "BMI", "ar": "الكتلة"},
"calc-health": {"en": "Calculators", "ar": "الصحية"},
"calories": {"en": "Calories", "ar": "سعرات"},
"bmr": {"en": "BMR", "ar": "معدل الأيض القاعدي"},
"idealBody": {"en": "Ideal Body", "ar": "الجسم المثالي"},
"body_word": {"en": "Body", "ar": "الجسم"},
"fat": {"en": "Fat", "ar": "دهون"},
"carbohydrate": {"en": "Carbohydrate", "ar": "كربوهيدرات"},
"proteinFat": {"en": "Protein Fat", "ar": "دهون البروتين"},
"ovulation": {"en": "Ovulation", "ar": "الإباضة"},
"delivery": {"en": "Delivery", "ar": "الولادة"},
"bmiCalcDesc": {
"en":
"'Calculate the BMI value and weight\n status to identify the healthy weight .\n Not appropriate for children and women\n who are pregnant or breastfeeding'",
"ar":
"حساب قيمة مؤشر كتلة الجسم وحالة الوزن لتحديد الوزن الصحي. \n وغير مناسب للأطفال والنساء الحوامل أو المرضعات"
},
"selectUnit": {"en": "Select Unit", "ar": "اختر الوحدة"},
"feet": {"en": "Feet", "ar": "قدم"},
"pound": {"en": "Pound", "ar": "رطل"},
"seeListOfDoctor": {"en": "See List Of Doctors", "ar": "انظر قائمة الأطباء"},
"obese": {"en": "Obese", "ar": "سمين"},
"overWeight": {"en": "OverWeight", "ar": "وزن زائد"},
"healthy": {"en": "Healthy", "ar": "صحي"},
"underWeight": {"en": "UnderWeight", "ar": "نقص الوزن"},
"bmiCalcMsgObese": {"en" : "A BMI of over 30 indicates that are heavily overweight. Health may be at risk if not lose weight. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get started.", "ar": "يشير مؤشر كتلة الجسم الذي يزيد عن 30 إلى زيادة الوزن بشكل كبير. قد تكون الصحة في خطر إذا لم تفقد الوزن. يوصى بالتحدث إلى الطبيب أو أخصائي التغذية للحصول على المشورة. لحجز موعد ، انقر أدناه للبدء."},
"bmiCalcMsgOverweight": {"en" : 'A BMI of 25 - 30 indicates that are slightly overweight. May be advised to lose some weight for health reasons. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get ', "ar": "يشير مؤشر كتلة الجسم من 25 إلى 30 إلى زيادة الوزن قليلاً. قد ينصح بفقدان بعض الوزن لأسباب صحية. يوصى بالتحدث إلى الطبيب أو أخصائي التغذية للحصول على المشورة. لحجز موعد ، انقر أدناه للحصول على"},
"bmiCalcMsgHealthy": {"en" : "A BMI of 18.5 - 25 indicates that are at a healthy weight for the height. By maintaining a healthy weight, lower the risk of developing severe health problems. To book an appointment, click below to get started.", "ar": "يشير مؤشر كتلة الجسم من 18.5 - 25 إلى وزن صحي بالنسبة للطول. بالحفاظ على وزن صحي ، قلل من خطر الإصابة بمشاكل صحية خطيرة. لحجز موعد ، انقر أدناه للبدء."},
"bmiCalcMsgUnderWeight": {"en" : "A BMI of less than 18.5 indicates that are underweight, so may need to put on some weight. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get started.", "ar": "يشير مؤشر كتلة الجسم الذي يقل عن 18.5 إلى أنك تعاني من نقص الوزن ، لذلك قد تحتاج إلى زيادة الوزن. يوصى بالتحدث إلى الطبيب أو أخصائي التغذية للحصول على المشورة. لحجز موعد ، انقر أدناه للبدء."},
"bariatrics": {"en" : "Bariatrics", "ar": "طب السمنة"},
"bariatricsHeaderMsg": {"en" : "Choose one of the following symptoms to show the right doctors or choose a consultation to show all", "ar": "اختر أحد الأعراض التالية لتظهر للأطباء المناسبين أو اختر استشارة لإظهار الكل"},
"continue": {"en" : "CONTINUE", "ar": "إستمرار"},
"skip": {"en" : "SKIP", "ar": "تخطى"},
"calorieCalcDesc": {"en" : "Calculates daily calorie intake based on several factors, like height, weight, age, gender and daily physical activity ", "ar": "يحسب السعرات الحرارية اليومية بناءً على عدة عوامل ، مثل الطول والوزن والعمر والجنس والنشاط البدني اليومي"},
"age11_120_years": {"en" : "The Age ( 11 - 120 ) yrs", "ar": "العمر (11 - 120) سنة"},
"weight-add": {"en": "Enter Weight Value", "ar": "أدخل الوزن "},
"systolic-add": {"en": "Enter Systolic Value", "ar": "أدخل قيمة الإنقباض "},
"diastolic-add": {"en": "Enter Diastolic Value", "ar": "أدخل قيمة الإنبساط "},
@ -1184,6 +1229,98 @@ const Map localizedValues = {
"en": "To recieve water reminders, please turn on notifications in the system settings",
"ar": "الرجاء تفعيل الاشعارات في الاعدادات"
},
"select-location": {
"en": "Select Location",
"ar": "اختر موقعا"
},
"result-header": {
"en": "Get The Result During 8 Hours",
"ar": "احصل على النتيجة خلال 8 ساعة"
},
"covid-info": {
"en": "We are using the advance technology to test COVID-19, The sample for examination is taking between the nose and mouth (nasopharyngeal swab), the examination is done by ELITE In Genius of the company ELITECH GROUP MOLECULAR DIAGNOSTICS, Note that the device belongs to an Italian company and is manufactured in Japan with RC- PCR",
"ar": "يتوفر لدينا أحدث جهاز خاص بفحص مرض الكورونا (COVID-19) طريقة الفحص تؤخذ مسحة من البلعوم الأنفي ( عن طريف الأنف) ويتم الفحص بواسطة جهاز ELITE In Genius التابع لشركة ELITECH GROUP MOLECULAR DIAGNOSTICS علما بأن الجهاز تابع لشركة إيطالية ومصنع في اليابان بتقينة RC-PCR"
},
"select-appo": {
"en": "Kindly select one of the available appointments from below:",
"ar": "يرجى اختيار أحد المواعيد المتاحة من أدناه:"
},
"covid-alert-header": {
"en": "Pay With-in 15 mins to confirm the appointment",
"ar": "الرجاء اتمام عملية الدفع خلال 15 دقيقه لتاكيد الموعد"
},
"covid-alert-info": {
"en": "Payment for Covid-19 Test should Be made with-in 15 mins otherwise The system will Cancel the Scheduled appointment automatically",
"ar": "سيتم الغاء الموعد عن طريق النظام بشكل الي في حال عدم اتمام عمليه الدفع خلال 15 دقيقة​"
},
"covid-alert-mins": {
"en": "Pay With-in 15 mins",
"ar": "ادفع خلال 15 دقيقة"
},
"back": {
"en": "Back",
"ar": "رجوع"
},
"get-directions": {
"en": "Get Directions",
"ar": "احصل على الاتجاهات"
},
"selected-location": {
"en": "Selected Location:",
"ar": "الموقع المحدد:"
},
"test-fee": {
"en": "Test Fee",
"ar": "رسوم الاختبار"
},
"pay-options": {
"en": "You can pay by the following Options:",
"ar": "يمكنك الدفع عن طريق الخيارات التالية:"
},
"livecare-service": {
"en": "LiveCare Service",
"ar": "خدمة لايف كير"
},
"livecare-service-desc": {
"en": "is to obtain medical advice with a specialist doctor Via a video call",
"ar": "هي الحصول على استشارة طبية مع طبيب مختص عن طريق اتصال فيديو"
},
"why-livecare": {
"en": "WHY LIVECARE",
"ar": "لماذا خدمة اللايف كير"
},
"livecare-point-1": {
"en": "No need to wait you will get Medical consultation immediately via Video call",
"ar": "لا داعي للانتظار سوف تحصل على الاستشارة الطبية فورا عن طريق مكالمة الفيديو"
},
"doc-virtual-appo-ins4": {
"en": "The doctor will see your medical file",
"ar": "سوف يتمكن الطبيب من الاطلاع على ملفك الطبي كامل"
},
"doc-virtual-appo-ins5": {
"en": "Free prescription delivery service",
"ar": "خدمة توصيل الادوية مجانا"
},
"livecare-summary": {
"en": "** The service is included with some insurance companies according to the terms and conditions With our best wishes for health and wellness",
"ar": "** الخدمة مشمولة لدى بعض شركات التامين على حسب الشروط والاحكام مع تمنياتنا لكم بدوام الصحة والعافية"
},
"livecare-option-1": {
"en": "Get Medical consultation immediately",
"ar": "الحصول على الاستشارة فورا"
},
"livecare-option-2": {
"en": "Instant video call",
"ar": "اتصال فيديو فوري"
},
"livecare-option-3": {
"en": "Book Appointment",
"ar": "حجز موعد"
},
"livecare-option-4": {
"en": "Schedule video call",
"ar": "اتصال فيديو مجدول"
},
"verification_message_code": {"en": "Please enter verification code", "ar": "الرجاء إدخال رمز التحقق"},
"sms_code": {"en": "Enter SMS Code here", "ar": "أدخل رمز التحقق هنا"},
"code_failure": {"en": "Didnt received the code", "ar": "لم أستلم رمز التحقق"},
@ -1192,4 +1329,5 @@ const Map localizedValues = {
"areyousure": {"en": "Are you sure you want to Add", "ar": "هل أنت متأكد أنك تريد إضافة"},
"preferredunit": {"en": "Select the preferred unit", "ar": "اختر الوحدة المفضلة"},
"select-unit": {"en": "Select unit", "ar": "اختر وحدة القياس"}
// "visit": {"en" : "Visit", "ar": "الزيارة"},
};

@ -0,0 +1,68 @@
class ClinicCategory {
int clinicID;
int categoryID;
String categoryName;
String categoryNameN;
String icon;
String bodyImageEN;
String fullImageEN;
String bodyImageAR;
String fullmageAR;
bool isActive;
bool isCategoryGroup;
Null sortOrderAR;
Null sortOrderEN;
String clinicName;
ClinicCategory(
{this.clinicID,
this.categoryID,
this.categoryName,
this.categoryNameN,
this.icon,
this.bodyImageEN,
this.fullImageEN,
this.bodyImageAR,
this.fullmageAR,
this.isActive,
this.isCategoryGroup,
this.sortOrderAR,
this.sortOrderEN,
this.clinicName});
ClinicCategory.fromJson(Map<String, dynamic> json) {
clinicID = json['ClinicID'];
categoryID = json['CategoryID'];
categoryName = json['CategoryName'];
categoryNameN = json['CategoryNameN'];
icon = json['Icon'];
bodyImageEN = json['BodyImageEN'];
fullImageEN = json['FullImageEN'];
bodyImageAR = json['BodyImageAR'];
fullmageAR = json['FullmageAR'];
isActive = json['IsActive'];
isCategoryGroup = json['IsCategoryGroup'];
sortOrderAR = json['SortOrderAR'];
sortOrderEN = json['SortOrderEN'];
clinicName = json['ClinicName'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ClinicID'] = this.clinicID;
data['CategoryID'] = this.categoryID;
data['CategoryName'] = this.categoryName;
data['CategoryNameN'] = this.categoryNameN;
data['Icon'] = this.icon;
data['BodyImageEN'] = this.bodyImageEN;
data['FullImageEN'] = this.fullImageEN;
data['BodyImageAR'] = this.bodyImageAR;
data['FullmageAR'] = this.fullmageAR;
data['IsActive'] = this.isActive;
data['IsCategoryGroup'] = this.isCategoryGroup;
data['SortOrderAR'] = this.sortOrderAR;
data['SortOrderEN'] = this.sortOrderEN;
data['ClinicName'] = this.clinicName;
return data;
}
}

@ -0,0 +1,44 @@
class DiseasesByClinic {
int diseasesID;
String diseasesEN;
String diseasesAR;
int diseasesCategoryID;
Null diseasesCategoryEN;
Null diseasesCategoryAR;
String diseases;
Null diseasesCategory;
DiseasesByClinic(
{this.diseasesID,
this.diseasesEN,
this.diseasesAR,
this.diseasesCategoryID,
this.diseasesCategoryEN,
this.diseasesCategoryAR,
this.diseases,
this.diseasesCategory});
DiseasesByClinic.fromJson(Map<String, dynamic> json) {
diseasesID = json['DiseasesID'];
diseasesEN = json['Diseases_EN'];
diseasesAR = json['Diseases_AR'];
diseasesCategoryID = json['Diseases_CategoryID'];
diseasesCategoryEN = json['Diseases_CategoryEN'];
diseasesCategoryAR = json['Diseases_CategoryAR'];
diseases = json['Diseases'];
diseasesCategory = json['Diseases_Category'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['DiseasesID'] = this.diseasesID;
data['Diseases_EN'] = this.diseasesEN;
data['Diseases_AR'] = this.diseasesAR;
data['Diseases_CategoryID'] = this.diseasesCategoryID;
data['Diseases_CategoryEN'] = this.diseasesCategoryEN;
data['Diseases_CategoryAR'] = this.diseasesCategoryAR;
data['Diseases'] = this.diseases;
data['Diseases_Category'] = this.diseasesCategory;
return data;
}
}

@ -0,0 +1,76 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'file:///C:/Users/admin/AndroidStudioProjects/diplomatic-quarter/lib/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
class BariatricsService extends BaseService {
List<ClinicCategory> clinicCategoryList = [];
List<DiseasesByClinic> diseasesList = [];
Future getClinicCategory() async {
hasError = false;
Map<String, dynamic> body = Map();
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
body['ClinicID'] = 108; // hint: it is static depend on IONIC project
body['isDentalAllowedBackend'] = false;
body['LanguageID'] = languageID == 'ar' ? 1 : 2;
await baseAppClient.post(GET_CLINIC_CATEGORY,
onSuccess: (dynamic response, int statusCode) {
clinicCategoryList.clear();
if (response['ClinicCategoryList'] != null)
response['ClinicCategoryList'].forEach((city) {
clinicCategoryList.add(ClinicCategory.fromJson(city));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future getDiseaseByClinicId() async {
hasError = false;
Map<String, dynamic> body = Map();
body['ClinicID'] = 108; // hint: it is static depend on IONIC project
await baseAppClient.post(GET_DISEASE_BY_CLINIC_ID,
onSuccess: (dynamic response, int statusCode) {
diseasesList.clear();
if (response['DiseasesByClinicList'] != null)
response['DiseasesByClinicList'].forEach((city) {
diseasesList.add(DiseasesByClinic.fromJson(city));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future searchDoctorsByTime(DiseasesByClinic disease) async {
hasError = false;
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Map<String, dynamic> body = Map();
body['ClinicID'] = 108; // hint: it is static depend on IONIC project
body['ContinueDentalPlan'] = false;
body['DiseaseID'] = disease.diseasesID;
body['IsGetNearAppointment'] = false;
body['IsSearchAppointmnetByClinicID'] = true;
body['LanguageID'] = languageID == 'ar' ? 1 : 2;
body['Latitude'] = 0;
body['License'] = true;
body['Longitude'] = 0;
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(SEARCH_DOCTOR_BY_TIME,
onSuccess: (dynamic response, int statusCode) {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
}

@ -46,7 +46,8 @@ class BaseAppClient {
//Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
if (!isExternal) {
String token = await sharedPref.getString(TOKEN);
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE,'ar');
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var user = await sharedPref.getObject(USER_PROFILE);
if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID')
@ -58,7 +59,7 @@ class BaseAppClient {
body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL;
body['LanguageID'] = languageID == 'ar' ? 1 : 2;
body['LanguageID'] = languageID == 'ar' ? 1 : 2;
body['IPAdress'] = IP_ADDRESS;
body['generalid'] = GENERAL_ID;
@ -152,14 +153,26 @@ class BaseAppClient {
} else if (parsed['MessageStatus'] == 1 ||
parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode);
}
else if(parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']){
onFailure(
parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode);
}
else if (!parsed['IsAuthenticated']) {
await logout();
} else if (parsed['MessageStatus'] == 2 &&
parsed['IsAuthenticated']) {
if (parsed['message'] == null &&
parsed['ErrorEndUserMessage'] == null) {
if(parsed['ErrorSearchMsg'] == null ){
onFailure("Server Error found with no available message",
statusCode);
}else {
onFailure(parsed['ErrorSearchMsg'],
statusCode);
}
} else {
onFailure(
parsed['message'] ??
parsed['ErrorEndUserMessage'] ??
parsed['ErrorMessage'],
statusCode);
}
} else if (!parsed['IsAuthenticated']) {
await logout();
//helpers.showErrorToast('Your session expired Please login agian');
} else {
@ -185,6 +198,7 @@ class BaseAppClient {
onFailure(e.toString(), -1);
}
}
Future navigateToAppUpdate(context, String text) async {
Navigator.pushReplacement(
context,
@ -194,9 +208,9 @@ class BaseAppClient {
get(String endPoint,
{Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure,
Map<String, dynamic> queryParams,
bool isExternal = false}) async {
Function(String error, int statusCode) onFailure,
Map<String, dynamic> queryParams,
bool isExternal = false}) async {
String url;
if (isExternal) {
url = endPoint;
@ -234,9 +248,9 @@ class BaseAppClient {
getPharmacy(String endPoint,
{Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure,
bool isAllowAny = false,
bool isExternal = false,
Function(String error, int statusCode) onFailure,
bool isAllowAny = false,
bool isExternal = false,
Map<String, dynamic> queryParams}) async {
String url;
@ -286,7 +300,10 @@ class BaseAppClient {
}
}
simpleGet(String fullUrl, {Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, Map<String, String> queryParams}) async {
simpleGet(String fullUrl,
{Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure,
Map<String, String> queryParams}) async {
String url = fullUrl;
var haveParams = (queryParams != null);
if (haveParams) {
@ -298,7 +315,10 @@ class BaseAppClient {
if (await Utils.checkConnection()) {
final response = await http.get(
url.trim(),
headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
},
);
final int statusCode = response.statusCode;
@ -320,7 +340,8 @@ class BaseAppClient {
await authenticatedUserObject.getUser();
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin =
false;
var model = Provider.of<ToDoCountProviderModel>(AppGlobal.context,listen: false);
var model =
Provider.of<ToDoCountProviderModel>(AppGlobal.context, listen: false);
_vitalSignService.weightKg = "";
_vitalSignService.heightCm = "";
model.setState(0, false);
@ -329,12 +350,13 @@ class BaseAppClient {
String getSessionId(String id) {
///return id.replaceAll(RegExp('/[^\w\s]/'), '');
return id.replaceAll(RegExp('/[^a-zA-Z ]'), '');
return id.replaceAll(RegExp('/[^a-zA-Z ]'), '');
}
static defaultHttpParameters() async {
String token = await sharedPref.getString(TOKEN);
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var user = await sharedPref.getObject(USER_PROFILE);
var params = {};
if (user != null) {
@ -352,4 +374,4 @@ class BaseAppClient {
return params;
}
}
}

@ -0,0 +1,48 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart';
import 'file:///C:/Users/admin/AndroidStudioProjects/diplomatic-quarter/lib/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import '../../../../locator.dart';
class BariatricsViewModel extends BaseViewModel {
BariatricsService _service = locator<BariatricsService>();
List<ClinicCategory> get clinicCategoryList => _service.clinicCategoryList;
List<DiseasesByClinic> get diseasesList => _service.diseasesList;
void getClinicCategory() async {
setState(ViewState.Busy);
await _service.getClinicCategory();
if (_service.hasError) {
error = _service.error;
setState(ViewState.Error);
} else {
getDiseaseByClinicId();
}
}
void getDiseaseByClinicId() async {
setState(ViewState.Busy);
await _service.getDiseaseByClinicId();
if (_service.hasError) {
error = _service.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
Future searchDoctorsByTime(DiseasesByClinic disease) async {
setState(ViewState.Busy);
await _service.searchDoctorsByTime(disease);
if (_service.hasError) {
error = _service.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
}

@ -18,6 +18,7 @@ import 'package:get_it/get_it.dart';
import 'core/service/AlHabibMedicalService/cmc_service.dart';
import 'core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'core/service/AlHabibMedicalService/e_referral_service.dart';
import 'core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart';
import 'core/service/AlHabibMedicalService/home_health_care_service.dart';
import 'core/service/AuthenticatedUserObject.dart';
import 'core/service/appointment_rate_service.dart';
@ -67,6 +68,7 @@ import 'core/service/parmacyModule/parmacy_module_service.dart';
import 'core/service/offers_service.dart';
import 'core/service/pharmacy_categorise_service.dart';
import 'core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart';
import 'core/viewModels/TermsConditionsViewModel.dart';
import 'core/viewModels/all_habib_medical_services/e_referral_view_model.dart';
import 'core/viewModels/appointment_rate_view_model.dart';
@ -210,6 +212,7 @@ void setupLocator() {
locator.registerLazySingleton(() => PrivilegeService());
locator.registerLazySingleton(() => WeatherService());
locator.registerLazySingleton(() => TermsConditionsService());
locator.registerLazySingleton(() => BariatricsService());
/// View Model
locator.registerFactory(() => HospitalViewModel());
@ -273,6 +276,7 @@ void setupLocator() {
//pharmacy
locator.registerFactory(() => PharmacyCategoriseViewModel());
locator.registerFactory(() => OffersCategoriseViewModel());
locator.registerFactory(() => BariatricsViewModel());
// Offer And Packages
//----------------------

@ -43,7 +43,7 @@ class _CMCPageState extends State<CMCPage>
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
description:TranslationBase.of(context).infoCMC,
imagesInfo: [ImagesInfo(imageAr: 'assets/images/AlHabibMedicalService/Wifi-AR.png',imageEn: 'assets/images/AlHabibMedicalService/Wifi-EN.png', isAsset: true)],
imagesInfo: [ImagesInfo(imageAr: 'assets/images/Wifi-AR.png',imageEn: 'assets/images/wifi-EN.png', isAsset: true)],
appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup,
body: Scaffold(
extendBodyBehindAppBar: true,

@ -1,5 +1,6 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
@ -37,13 +38,14 @@ class _HomeHealthCarePageState extends State<HomeHealthCarePage>
Widget build(BuildContext context) {
return BaseView<HomeHealthCareViewModel>(
onModelReady: (model){
// model.getHHCAllServices();
model.getHHCAllPresOrders();
},
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
description: TranslationBase.of(context).HHCNotAuthMsg,
appBarTitle: TranslationBase.of(context).homeHealthCare,
imagesInfo: [ImagesInfo(imageAr: 'assets/images/Wifi-AR.png',imageEn: 'assets/images/wifi-EN.png', isAsset: true)],
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(

@ -0,0 +1,190 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
// TODO mosa_remark
class BariatricsPage extends StatefulWidget {
final age;
final gender;
final double obeseResult;
BariatricsPage(this.age, this.gender, this.obeseResult);
@override
_BariatricsPageState createState() => _BariatricsPageState();
}
class _BariatricsPageState extends State<BariatricsPage> {
DiseasesByClinic _selectedDisease;
@override
Widget build(BuildContext context) {
ProjectViewModel projectProvider = Provider.of(context);
return BaseView<BariatricsViewModel>(
onModelReady: (model) => model.getClinicCategory(),
builder: (_, model, w) =>
AppScaffold(
isShowAppBar: true,
appBarTitle: "${TranslationBase
.of(context)
.bariatrics}",
baseViewModel: model,
body: Column(
children: [
Container(
margin: EdgeInsets.all(8.0),
child: Center(
child: Texts(TranslationBase
.of(context)
.bariatricsHeaderMsg),
),
),
Expanded(
child: Container(
margin: EdgeInsets.symmetric(
horizontal: 16.0, vertical: 8.0),
child: Row(
children: [
Expanded(
child: SingleChildScrollView(
child: Column(
children: [
...model.diseasesList
.map((item) =>
RadioListTile(
title: Texts("${item.diseases}"),
activeColor: Colors.blue.shade700,
value: item.diseasesID,
groupValue: _selectedDisease != null
? _selectedDisease.diseasesID
: -1,
selected: _selectedDisease != null ? item
.diseasesID ==
_selectedDisease.diseasesID : false,
onChanged: (val) {
setState(() {
_selectedDisease = item;
});
},
))
.toList()
],
),
),
),
Image.asset(
_getImageName(widget.gender, widget.obeseResult,
projectProvider.isArabic),
fit: BoxFit.cover,
),
],
),
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: BorderedButton(
TranslationBase
.of(context)
.continues,
fontSize: SizeConfig.textMultiplier * 2.1,
textColor: Colors.white,
vPadding: 8,
hPadding: 8,
backgroundColor: Theme
.of(context)
.primaryColor,
radius: 8,
fontWeight: FontWeight.bold,
handler: () async {
await model.searchDoctorsByTime(_selectedDisease);
if(model.state == ViewState.ErrorLocal){
AppToast.showErrorToast(message: model.error);
}
// Navigator.push(
// context,
// MaterialPageRoute(builder: (context) => BariatricsPage()),
// );
},
),
),
Container(
margin: EdgeInsets.only(bottom: 16.0, left: 16, right: 16),
child: BorderedButton(
TranslationBase
.of(context)
.skip,
fontSize: SizeConfig.textMultiplier * 2.1,
textColor: Colors.blue,
vPadding: 8,
hPadding: 8,
backgroundColor: Color(0x00000000),
radius: 8,
hasBorder: true,
borderColor: Color(0x00000000),
fontWeight: FontWeight.bold,
handler: () async {
await model.searchDoctorsByTime(_selectedDisease);
if(model.state == ViewState.ErrorLocal){
AppToast.showErrorToast(message: model.error);
}
// Navigator.push(
// context,
// MaterialPageRoute(builder: (context) => BariatricsPage()),
// );
},
),
),
],
),
),
);
}
_getImageName(int gender, double obeseResult, bool isArabic) {
String path = "assets/images/BMI/";
double result = obeseResult;
if (result < 18.5 && gender == 1) {
path += "bmi_blue_male";
} else if (result >= 18.5 && result <= 24.9 && gender == 1) {
path += "bmi_green_male";
} else if (result >= 25 && result <= 29.9 && gender == 1) {
path += "bmi_yellow_male";
} else if (result >= 30 && result <= 34.9 && gender == 1) {
path += "bmi_orange_male";
} else if (result >= 35 && gender == 1) {
path += "bmi_red_male";
} else if (result < 18.5 && gender == 2) {
path += "bmi_blue_female";
} else if (result >= 18.5 && result <= 24.9 && gender == 2) {
path += "bmi_green_female";
} else if (result >= 25 && result <= 29.9 && gender == 2) {
path += "bmi_yellow_female";
} else if (result >= 30 && result <= 34.9 && gender == 2) {
path += "bmi_orange_female";
} else if (result >= 35 && gender == 2) {
path += "bmi_red_female";
} else {
path += "default.png";
}
if (isArabic) {
path += "_ar.png";
} else {
path += "_en.png";
}
return path;
}
}

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -27,6 +28,7 @@ class _BMICalculatorState extends State<BMICalculator> {
Color ftCard = inactiveCardColor;
Color lbCard = inactiveCardColor;
Color kgCard = activeCardColor;
void updateColor(int type) {
//MG/DLT card
if (type == 1) {
@ -84,31 +86,27 @@ class _BMICalculatorState extends State<BMICalculator> {
return bmiResult;
}
void showTextResult() {
void showTextResult(BuildContext context) {
if (bmiResult >= 30) {
textResult = 'Obese';
textResult = TranslationBase.of(context).obese;
} else if (bmiResult < 30 && bmiResult >= 25) {
textResult = 'OverWeight';
textResult = TranslationBase.of(context).overWeight;
} else if (bmiResult < 25 && bmiResult >= 18.5) {
textResult = 'Healthy';
textResult = TranslationBase.of(context).healthy;
} else if (bmiResult < 18.5) {
textResult = 'UnderWeight';
textResult = TranslationBase.of(context).underWeight;
}
}
void showMsg() {
void showMsg(BuildContext context) {
if (bmiResult >= 30) {
msg =
'A BMI of over 30 indicates that are heavily overweight. Health may be at risk if not lose weight. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get started.';
msg = TranslationBase.of(context).bmiCalcMsgObese;
} else if (bmiResult < 30 && bmiResult >= 25) {
msg =
'A BMI of 25 - 30 indicates that are slightly overweight. May be advised to lose some weight for health reasons. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get ';
msg = TranslationBase.of(context).bmiCalcMsgOverweight;
} else if (bmiResult < 25 && bmiResult >= 18.5) {
msg =
'A BMI of 18.5 - 25 indicates that are at a healthy weight for the height. By maintaining a healthy weight, lower the risk of developing severe health problems. To book an appointment, click below to get started.';
msg = TranslationBase.of(context).bmiCalcMsgHealthy;
} else if (bmiResult < 18.5) {
msg =
'A BMI of less than 18.5 indicates that are underweight, so may need to put on some weight. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get started.';
msg = TranslationBase.of(context).bmiCalcMsgUnderWeight;
}
}
@ -121,26 +119,28 @@ class _BMICalculatorState extends State<BMICalculator> {
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: 'BMI Calculator',
isShowDecPage: false,
appBarTitle:
"${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Center(
child: Container(
width: 350.0,
margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
child: Padding(
padding: EdgeInsets.symmetric(vertical: 15.0),
child: Text(
'Calculate the BMI value and weight\n status to identify the healthy weight .\n Not appropriate for children and women\n who are pregnant or breastfeeding',
TranslationBase.of(context).bmiCalcDesc,
style: TextStyle(fontSize: 18.0),
),
),
),
),
Container(
height: 200.0,
width: 350.0,
margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
padding: EdgeInsets.only(bottom: 16),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
@ -151,7 +151,7 @@ class _BMICalculatorState extends State<BMICalculator> {
children: [
Padding(
padding: EdgeInsets.all(8.0),
child: Texts('Height'),
child: Texts(TranslationBase.of(context).height),
),
],
),
@ -241,7 +241,7 @@ class _BMICalculatorState extends State<BMICalculator> {
children: [
Padding(
padding: EdgeInsets.all(8.0),
child: Texts('Select Unit'),
child: Texts(TranslationBase.of(context).selectUnit),
),
],
),
@ -273,7 +273,8 @@ class _BMICalculatorState extends State<BMICalculator> {
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 0.0, horizontal: 18.0),
child: Center(child: Texts('CM')),
child: Center(
child: Texts(TranslationBase.of(context).cm)),
),
),
),
@ -302,7 +303,8 @@ class _BMICalculatorState extends State<BMICalculator> {
child: Padding(
padding:
const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts('FT')),
child: Center(
child: Texts(TranslationBase.of(context).feet)),
),
),
),
@ -315,8 +317,8 @@ class _BMICalculatorState extends State<BMICalculator> {
height: 25.0,
),
Container(
height: 200.0,
width: 350.0,
margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
padding: EdgeInsets.only(bottom: 16),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
@ -327,7 +329,7 @@ class _BMICalculatorState extends State<BMICalculator> {
children: [
Padding(
padding: EdgeInsets.all(8.0),
child: Texts('Weight'),
child: Texts(TranslationBase.of(context).weight),
),
],
),
@ -417,7 +419,7 @@ class _BMICalculatorState extends State<BMICalculator> {
children: [
Padding(
padding: EdgeInsets.all(8.0),
child: Texts('Select Unit'),
child: Texts(TranslationBase.of(context).selectUnit),
),
],
),
@ -449,7 +451,8 @@ class _BMICalculatorState extends State<BMICalculator> {
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 0.0, horizontal: 18.0),
child: Center(child: Texts('KG')),
child: Center(
child: Texts(TranslationBase.of(context).kg)),
),
),
),
@ -478,7 +481,9 @@ class _BMICalculatorState extends State<BMICalculator> {
child: Padding(
padding:
const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts('LB')),
child: Center(
child:
Texts(TranslationBase.of(context).pound)),
),
),
),
@ -491,15 +496,15 @@ class _BMICalculatorState extends State<BMICalculator> {
height: 25.0,
),
Container(
height: 50.0,
width: 350.0,
margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
padding: EdgeInsets.symmetric(vertical: 8),
child: SecondaryButton(
label: 'CALCULATE',
label: TranslationBase.of(context).calculate,
onTap: () => {
setState(() {
calculateBMI();
showTextResult();
showMsg();
showTextResult(context);
showMsg(context);
{
Navigator.push(
context,

@ -1,5 +1,9 @@
import 'dart:ffi';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -12,6 +16,7 @@ class ResultPage extends StatelessWidget {
final String msg;
ResultPage({this.finalResult, this.textResult, this.msg});
Color inductorColor;
double percent;
@ -45,53 +50,74 @@ class ResultPage extends StatelessWidget {
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: "BMI Calculator",
appBarTitle:
"${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
SizedBox(
// height: 40.0,
),
Center(
child: CircularPercentIndicator(
radius: 220.0,
lineWidth: 20.0,
percent: percentInductor(),
center: Column(
mainAxisAlignment: MainAxisAlignment.center,
Expanded(
child: SingleChildScrollView(
child: Column(
children: [
Text(
finalResult.toStringAsFixed(1),
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.bold,
Container(
margin: EdgeInsets.only(top: 50),
child: Center(
child: CircularPercentIndicator(
radius: 220.0,
lineWidth: 20.0,
percent: percentInductor(),
center: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
finalResult.toStringAsFixed(1),
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.bold,
),
),
SizedBox(
height: 5.0,
),
Text(
textResult,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.w600,
),
),
],
),
progressColor: colorInductor(),
backgroundColor: Colors.white,
),
),
),
SizedBox(
height: 5.0,
),
Text(
textResult,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.w600,
),
Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: Texts(msg),
),
],
),
progressColor: colorInductor(),
backgroundColor: Colors.white,
),
),
Container(
height: 120,
width: 280.0,
child: Texts(msg),
),
Container(
width: 350,
child: Button(
label: 'See List Of Doctors',
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: BorderedButton(
TranslationBase.of(context).seeListOfDoctor,
fontSize: SizeConfig.textMultiplier * 2.1,
textColor: Colors.white,
vPadding: 8,
hPadding: 8,
backgroundColor: Theme.of(context).primaryColor,
radius: 8,
fontWeight: FontWeight.bold,
handler: (){
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => BariatricsPage(1, 1, finalResult)),
);
},
),
),
],

@ -122,6 +122,7 @@ class _BmrCalculatorState extends State<BmrCalculator> {
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
appBarTitle: 'Bmr Calculator',
body: Padding(
padding: EdgeInsets.symmetric(horizontal: 25.0, vertical: 15.0),

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -29,6 +30,7 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
int weight = 0;
double calories;
String dropdownValue;
void updateColor(int type) {
//MG/DLT card
if (type == 1) {
@ -102,89 +104,91 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: 'Calorie Calculator',
body: Padding(
padding: const EdgeInsets.symmetric(horizontal: 25.0, vertical: 15.0),
child: SingleChildScrollView(
child: Container(
height: 890.0,
child: Column(
//mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(10.0),
child: Texts(
'Calculates daily calorie intake based on several factors, like height, weight, age, gender and daily physical activity rate',
),
),
Padding(
padding:
EdgeInsets.symmetric(horizontal: 10.0, vertical: 15.0),
child: Texts('Gender'),
),
Container(
width: 350,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(35.0),
color: Colors.white,
border: Border.all(
color: Colors.black45,
)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
GestureDetector(
onTap: () {
setState(() {
updateColor(1);
isMale = false;
});
},
child: Container(
height: 55.0,
width: 170.0,
decoration: BoxDecoration(
color: maleCard,
borderRadius: BorderRadius.circular(35.0),
isShowDecPage: false,
appBarTitle:
"${TranslationBase.of(context).calories} ${TranslationBase.of(context).calcHealth}",
body: Column(
children: [
Expanded(
child: SingleChildScrollView(
child: Container(
margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0),
child: Column(
//mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context).calorieCalcDesc,
),
SizedBox(
height: 8.0,
),
Texts(TranslationBase.of(context).gender),
SizedBox(
height: 8.0,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30.0),
color: Colors.white,
border: Border.all(
color: Colors.black45,
)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Expanded(
child: GestureDetector(
onTap: () {
setState(() {
updateColor(1);
isMale = false;
});
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 16),
decoration: BoxDecoration(
color: maleCard,
borderRadius: BorderRadius.circular(30.0),
),
child: Center(
child: Texts(
TranslationBase.of(context).female)),
),
),
),
child: Center(child: Texts('FEMALE')),
),
),
GestureDetector(
onTap: () {
setState(() {
updateColor(2);
isMale = true;
});
},
child: Container(
height: 55.0,
width: 170.0,
decoration: BoxDecoration(
color: femaleCard,
borderRadius: BorderRadius.circular(35.0),
Expanded(
child: GestureDetector(
onTap: () {
setState(() {
updateColor(2);
isMale = true;
});
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 16),
decoration: BoxDecoration(
color: femaleCard,
borderRadius: BorderRadius.circular(30.0),
),
child: Center(
child: Texts(
TranslationBase.of(context).male)),
),
),
),
child: Center(child: Texts('MALE')),
),
],
),
],
),
),
SizedBox(
height: 15.0,
),
Texts(
'The Age ( 11 - 120 ) yrs',
),
SizedBox(
height: 10.0,
),
Row(
children: [
),
SizedBox(
height: 12.0,
),
Texts(
TranslationBase.of(context).age11_120Years,
),
Container(
width: 340.0,
height: 60.0,
margin:
EdgeInsets.symmetric(horizontal: 4.0, vertical: 12.0),
decoration: BoxDecoration(
color: Colors.white,
),
@ -195,7 +199,7 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
width: 60,
foregroundDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(5.0),
border: Border.all(
@ -206,12 +210,16 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
child: Row(
children: <Widget>[
Expanded(
child: Center(
child: Text(age.toString()),
child: Padding(
padding: const EdgeInsets.all(4.0),
child: Center(
child: Text(age.toString()),
),
),
),
Container(
height: 38.0,
padding:
EdgeInsets.symmetric(horizontal: 4),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
@ -274,16 +282,12 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
],
),
),
],
),
Texts(
'Height',
),
Row(
children: [
Texts(
TranslationBase.of(context).height,
),
Container(
width: 340.0,
height: 60.0,
margin:
EdgeInsets.symmetric(horizontal: 4.0, vertical: 12.0),
decoration: BoxDecoration(
color: Colors.white,
),
@ -305,12 +309,16 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
child: Row(
children: <Widget>[
Expanded(
child: Center(
child: Text(height.toString()),
child: Padding(
padding: const EdgeInsets.all(4.0),
child: Center(
child: Text(height.toString()),
),
),
),
Container(
height: 38.0,
padding:
EdgeInsets.symmetric(horizontal: 4.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
@ -373,85 +381,90 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
],
),
),
],
),
Texts('Select Unit'),
SizedBox(
height: 5.0,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
GestureDetector(
onTap: () {
setState(() {
updateColorHeight(1);
});
},
child: Container(
height: 55.0,
width: 150.0,
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset:
Offset(0, 3), // changes position of shadow
),
],
color: cmCard,
borderRadius: BorderRadius.circular(3.0),
),
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 0.0, horizontal: 18.0),
child: Center(child: Texts('CM')),
),
),
Texts(
TranslationBase.of(context).selectUnit,
),
SizedBox(
height: 8.0,
),
GestureDetector(
onTap: () {
setState(() {
updateColorHeight(2);
});
},
child: Container(
height: 55.0,
width: 150.0,
decoration: BoxDecoration(
color: ftCard,
borderRadius: BorderRadius.circular(3.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset:
Offset(0, 3), // changes position of shadow
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Expanded(
child: GestureDetector(
onTap: () {
setState(() {
updateColorHeight(1);
});
},
child: Container(
padding: EdgeInsets.all(12),
margin: EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset: Offset(
0, 3), // changes position of shadow
),
],
color: cmCard,
borderRadius: BorderRadius.circular(3.0),
),
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 0.0, horizontal: 18.0),
child: Center(child: Texts(TranslationBase.of(context).cm)),
),
),
],
),
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts('Ft')),
Expanded(
child: GestureDetector(
onTap: () {
setState(() {
updateColorHeight(2);
});
},
child: Container(
padding: EdgeInsets.all(12),
margin: EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration(
color: ftCard,
borderRadius: BorderRadius.circular(3.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset: Offset(
0, 3), // changes position of shadow
),
],
),
child: Padding(
padding:
const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts(TranslationBase.of(context).feet))),
),
),
),
),
],
),
SizedBox(
height: 8.0,
),
Texts(
TranslationBase.of(context).weight,
),
SizedBox(
height: 5.0,
),
],
),
SizedBox(
height: 5.0,
),
Texts(
'Weight',
),
Row(
children: [
Container(
width: 340.0,
height: 60.0,
margin:
EdgeInsets.symmetric(horizontal: 4.0, vertical: 12.0),
decoration: BoxDecoration(
color: Colors.white,
),
@ -500,7 +513,8 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
),
onTap: () {
setState(() {
if (weight < 250) weight++;
if (weight < 250)
weight++;
});
},
),
@ -541,137 +555,140 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
],
),
),
],
),
Texts('Select Unit'),
SizedBox(
height: 5.0,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
GestureDetector(
onTap: () {
setState(() {
updateColorWeight(1);
});
},
child: Container(
height: 55.0,
width: 150.0,
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset:
Offset(0, 3), // changes position of shadow
Texts(TranslationBase.of(context).selectUnit),
SizedBox(
height: 5.0,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Expanded(
child: GestureDetector(
onTap: () {
setState(() {
updateColorWeight(1);
});
},
child: Container(
padding: EdgeInsets.all(12),
margin: EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset: Offset(
0, 3), // changes position of shadow
),
],
color: kgCard,
borderRadius: BorderRadius.circular(3.0),
),
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 0.0, horizontal: 18.0),
child: Center(child: Texts(TranslationBase.of(context).kg)),
),
),
],
color: kgCard,
borderRadius: BorderRadius.circular(3.0),
),
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 0.0, horizontal: 18.0),
child: Center(child: Texts('KG')),
),
),
),
),
GestureDetector(
onTap: () {
setState(() {
updateColorWeight(2);
});
},
child: Container(
height: 55.0,
width: 150.0,
decoration: BoxDecoration(
color: lbCard,
borderRadius: BorderRadius.circular(3.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset:
Offset(0, 3), // changes position of shadow
Expanded(
child: GestureDetector(
onTap: () {
setState(() {
updateColorWeight(2);
});
},
child: Container(
padding: EdgeInsets.all(12),
margin: EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration(
color: lbCard,
borderRadius: BorderRadius.circular(3.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset: Offset(
0, 3), // changes position of shadow
),
],
),
child: Padding(
padding:
const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts(TranslationBase.of(context).pound)),
),
),
],
),
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts('LB')),
],
),
SizedBox(
height: 8.0,
),
Texts(TranslationBase.of(context).activityLevel),
Container(
child: DropdownButton<String>(
value: dropdownValue,
icon: Icon(Icons.arrow_downward),
iconSize: 24,
elevation: 16,
style: TextStyle(color: Colors.black87),
underline: Container(
height: 2,
color: Colors.black54,
),
onChanged: (String newValue) {
setState(() {
dropdownValue = newValue;
});
},
items: <String>[
'Almost Inactive(Little or no exercises)',
'Lighty Active (1-3) days per week',
'very Active(6-7) days per week',
'Super Active(very hard exercises)'
].map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(
value: value,
child: Text(value),
);
}).toList(),
),
),
],
),
SizedBox(
height: 5.0,
),
Texts('Activity level'),
Container(
width: 300,
child: DropdownButton<String>(
value: dropdownValue,
icon: Icon(Icons.arrow_downward),
iconSize: 24,
elevation: 16,
style: TextStyle(color: Colors.black87),
underline: Container(
height: 2,
color: Colors.black54,
SizedBox(
height: 25.0,
),
onChanged: (String newValue) {
setState(() {
dropdownValue = newValue;
});
},
items: <String>[
'Almost Inactive(Little or no exercises)',
'Lighty Active (1-3) days per week',
'very Active(6-7) days per week',
'Super Active(very hard exercises)'
].map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(
value: value,
child: Text(value),
);
}).toList(),
),
),
SizedBox(
height: 25.0,
),
Container(
height: 100.0,
width: 350.0,
child: SecondaryButton(
label: 'CALCULATE',
onTap: () {
setState(() {
calculateCalories();
print(calories);
{
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => CalorieResultPage(
calorie: calories,
)),
);
}
});
},
),
],
),
],
),
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0),
child: SecondaryButton(
label: TranslationBase.of(context).calculate,
onTap: () {
setState(() {
calculateCalories();
print(calories);
{
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => CalorieResultPage(
calorie: calories,
)),
);
}
});
},
),
),
),
],
),
);
}

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -12,7 +13,8 @@ class CalorieResultPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: 'Calorie Calculator',
isShowDecPage: false,
appBarTitle: "${TranslationBase.of(context).calories} ${TranslationBase.of(context).calculators}",
isShowAppBar: true,
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,

@ -18,6 +18,7 @@ class _HealthConverterState extends State<HealthConverter> {
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).converters,
body: Column(
children: [

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculat
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -37,7 +38,8 @@ class _HealthCalculatorsState extends State<HealthCalculators>
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: 'Health Calculators',
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).calculators,
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(
@ -72,13 +74,13 @@ class _HealthCalculatorsState extends State<HealthCalculators>
Container(
width: MediaQuery.of(context).size.width * 0.35,
child: Center(
child: Texts('General Health'),
child: Texts(TranslationBase.of(context).generalHealth),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.35,
child: Center(
child: Texts("Women's Health"),
child: Texts(TranslationBase.of(context).womanHealth),
),
),
],
@ -115,9 +117,9 @@ class _HealthCalculatorsState extends State<HealthCalculators>
);
},
child: MedicalProfileItem(
title: 'BMI',
title: TranslationBase.of(context).bmi,
imagePath: 'bmi_health_calculator.png',
subTitle: 'Calculators',
subTitle: TranslationBase.of(context).calcHealth,
),
),
),
@ -133,9 +135,9 @@ class _HealthCalculatorsState extends State<HealthCalculators>
);
},
child: MedicalProfileItem(
title: 'Calories',
title: TranslationBase.of(context).calories,
imagePath: 'calories-calculator.png',
subTitle: 'Calculators',
subTitle: TranslationBase.of(context).calcHealth,
),
),
),
@ -155,9 +157,9 @@ class _HealthCalculatorsState extends State<HealthCalculators>
);
},
child: MedicalProfileItem(
title: 'BMR',
title: TranslationBase.of(context).bmr,
imagePath: 'BMR_calculator.png',
subTitle: 'Calculators',
subTitle: TranslationBase.of(context).calcHealth,
),
),
),
@ -173,9 +175,9 @@ class _HealthCalculatorsState extends State<HealthCalculators>
);
},
child: MedicalProfileItem(
title: 'Ideal Body',
title: TranslationBase.of(context).idealBody,
imagePath: 'body_weight.png',
subTitle: 'Weight',
subTitle: TranslationBase.of(context).weight,
),
),
),
@ -195,9 +197,9 @@ class _HealthCalculatorsState extends State<HealthCalculators>
);
},
child: MedicalProfileItem(
title: 'Body',
title: TranslationBase.of(context).bodyWord,
imagePath: 'body_fat.png',
subTitle: 'Fat',
subTitle: TranslationBase.of(context).fat,
),
),
),
@ -213,9 +215,9 @@ class _HealthCalculatorsState extends State<HealthCalculators>
);
},
child: MedicalProfileItem(
title: 'Carbohydrate',
title: TranslationBase.of(context).carbohydrate,
imagePath: 'carb_protein.png',
subTitle: 'Protein Fat',
subTitle: TranslationBase.of(context).proteinFat,
),
),
),
@ -243,9 +245,9 @@ class _HealthCalculatorsState extends State<HealthCalculators>
);
},
child: MedicalProfileItem(
title: 'Ovulation',
title: TranslationBase.of(context).ovulation,
imagePath: 'ovulation_period_icon.png',
subTitle: 'Period',
subTitle: TranslationBase.of(context).period,
),
),
),
@ -261,9 +263,9 @@ class _HealthCalculatorsState extends State<HealthCalculators>
);
},
child: MedicalProfileItem(
title: 'Delivery',
title: TranslationBase.of(context).delivery,
imagePath: 'delivery_date_icon.png',
subTitle: 'Due Date',
subTitle: TranslationBase.of(context).dueDate,
),
),
),

@ -29,7 +29,6 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:giffy_dialog/giffy_dialog.dart';
import 'package:provider/provider.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
//import '../../../core/model/my_balance/AdvanceModel.dart';
import 'confirm_payment_page.dart';

@ -8,13 +8,13 @@ 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/uitl/gif_loader_dialog_utils.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';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class ConfirmSMSDialog extends StatefulWidget {
final String phoneNumber;
@ -112,32 +112,31 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
height: 40,
color: Theme.of(context).primaryColor,
child: Stack(
children: [
Center(
child: Texts(
'SMS',
color: Colors.white,
textAlign: TextAlign.center,
),
),
Positioned(child: Container(
child: InkWell(
onTap: () => Navigator.pop(context),
child: Container(
decoration: BoxDecoration(
shape: BoxShape.circle, color: Colors.white),
child: Icon(
Icons.clear,
color: Colors.grey[900],
)),
child: Texts(
'SMS',
color: Colors.white,
textAlign: TextAlign.center,
),
),
left: projectViewModel.isArabic? 2:0,
right: projectViewModel.isArabic? 0:2,
Positioned(
child: Container(
child: InkWell(
onTap: () => Navigator.pop(context),
child: Container(
decoration: BoxDecoration(
shape: BoxShape.circle, color: Colors.white),
child: Icon(
Icons.clear,
color: Colors.grey[900],
)),
),
),
left: projectViewModel.isArabic ? 2 : 0,
right: projectViewModel.isArabic ? 0 : 2,
)
],
),
),
Image.asset(
@ -335,14 +334,13 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
void submit(MyBalanceViewModel model) {
if (verifyAccountForm.currentState.validate()) {
GifLoaderDialogUtils.showMyDialog(context);
final activationCode =
digit1.text + digit2.text + digit3.text + digit4.text;
model
.checkActivationCodeForAdvancePayment(activationCode: activationCode)
.then((value) {})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
GifLoaderDialogUtils.hideDialog(context);
Navigator.pop(context, true);
});
}

@ -61,6 +61,7 @@ class _BookConfirmState extends State<BookConfirm> {
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).bookAppo,
isShowDecPage: false,
isShowAppBar: true,
body: SingleChildScrollView(
child: Container(
@ -461,6 +462,7 @@ class _BookConfirmState extends State<BookConfirm> {
dialog.showAlertDialog(context);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});

@ -5,9 +5,9 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DentalComplai
import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_card.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class DentalComplaints extends StatefulWidget {
SearchInfo searchInfo;
@ -59,12 +59,14 @@ class _DentalComplaintsState extends State<DentalComplaints> {
}
getChiefComplaintsList() {
GifLoaderDialogUtils.showMyDialog(context);
getLanguageID();
ClinicListService service = new ClinicListService();
service
.getChiefComplaintsList(
widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
print(res['List_DentalChiefComplain']);
setState(() {
@ -75,8 +77,8 @@ class _DentalComplaintsState extends State<DentalComplaints> {
});
} else {}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
}

@ -10,11 +10,11 @@ import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsLis
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class QRCode extends StatefulWidget {
PatientShareResponse patientShareResponse;
@ -235,6 +235,7 @@ class _QRCodeState extends State<QRCode> {
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () {
GifLoaderDialogUtils.showMyDialog(context);
service
.sendAppointmentQREmail(
widget.authUser.emailAddress,
@ -247,15 +248,14 @@ class _QRCodeState extends State<QRCode> {
widget.patientShareResponse.doctorSpeciality),
context)
.then((res) {
print(res);
GifLoaderDialogUtils.hideDialog(context);
ConfirmDialog.closeAlertDialog(context);
}).catchError((err) {
ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
}).showProgressBar(
text: "Loading",
backgroundColor: Colors.blue.withOpacity(0.6));
});
},
cancelFunction: () => {});
dialog.showAlertDialog(context);

@ -26,6 +26,7 @@ class _SearchResultsState extends State<SearchResults> {
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: TranslationBase.of(context).bookAppo,
isShowDecPage: false,
isShowAppBar: true,
body: Container(
margin: EdgeInsets.all(10.0),

@ -13,7 +13,6 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class SearchByClinic extends StatefulWidget {
final List clnicIds;
@ -213,6 +212,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
});
}
// TODO Mosa_REMARk to come back later
getDoctorsList(BuildContext context) {
GifLoaderDialogUtils.showMyDialog(context);
SearchInfo searchInfo = new SearchInfo();

@ -4,7 +4,6 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import '../SearchResults.dart';

@ -3,8 +3,8 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
// ignore: must_be_immutable
class DentalComplaintCard extends StatefulWidget {
@ -70,11 +70,13 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
List();
GifLoaderDialogUtils.showMyDialog(context);
ClinicListService service = new ClinicListService();
service
.getChiefComplaintDoctorList(widget.listDentalChiefComplain.iD,
widget.listDentalChiefComplain.projectID, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
print(res['List_DentalDoctorChiefComplaintMapping']);
setState(() {
@ -114,9 +116,9 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
Future navigateToSearchResults(

@ -6,7 +6,6 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart';
import 'package:rating_bar/rating_bar.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import '../DoctorProfile.dart';

@ -16,7 +16,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:intl/intl.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:table_calendar/table_calendar.dart';
class CovidTimeSlots extends StatefulWidget {
@ -113,7 +112,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: "COVID-19 TEST",
appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true,
body: SingleChildScrollView(
child: Container(
@ -147,8 +146,8 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
children: <Widget>[
Container(
margin: EdgeInsets.only(
left: 20.0, right: 20.0, top: 40.0),
child: Text("COVID-19 TEST",
left: 20.0, right: 20.0, top: 20.0),
child: Text(TranslationBase.of(context).covidTest,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
@ -157,7 +156,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
Container(
margin: EdgeInsets.only(
left: 20.0, right: 20.0, top: 10.0),
child: Text("Drive-Thru",
child: Text(TranslationBase.of(context).driveThru,
style: TextStyle(
color: Colors.white, fontSize: 24.0)),
),
@ -179,8 +178,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
children: <Widget>[
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"Kindly select one of the available appointments from below: ",
child: Text(TranslationBase.of(context).selectAppo,
style:
TextStyle(color: Colors.black, fontSize: 16.0)),
),
@ -493,10 +491,8 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
print(res);
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Appointment Booked Successfully");
// Future.delayed(new Duration(milliseconds: 1800), () {
getPatientShare(context, res['AppointmentNo'], docObject.clinicID,
docObject.projectID, docObject);
// });
} else {
GifLoaderDialogUtils.hideDialog(context);
appo = new AppoitmentAllHistoryResultList();
@ -522,9 +518,9 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
}
}).catchError((err) {
AppToast.showErrorToast(message: err);
GifLoaderDialogUtils.hideDialog(context);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo,
@ -543,8 +539,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
}
}).catchError((err) {
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
getPatientShare(context, String appointmentNo, int clinicID, int projectID,
@ -553,17 +548,14 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
service
.getPatientShare(appointmentNo, clinicID, projectID, context)
.then((res) {
print(res);
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
})
.catchError((err) {
print(err);
})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
navigateToPaymentAlert();
});
GifLoaderDialogUtils.hideDialog(context);
print(res);
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
navigateToPaymentAlert();
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
navigateToPaymentAlert() {
@ -576,12 +568,12 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
getCovidFreeSlots(BuildContext context, int projectID) {
CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context);
service.getCovidFreeSlots(context, projectID).then((res) {
print(res['COVID19_FreeTimeSlots']);
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
if (res['COVID19_FreeTimeSlots'].length != 0) {
freeSlotsResponse = res['COVID19_FreeTimeSlots'];
print(res['COVID19_FreeTimeSlots'].length);
_getJSONSlots().then((value) => {
setState(() => {
widget.selectedClinicID =
@ -599,7 +591,6 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
}
}).catchError((err) {
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
}

@ -1,13 +1,16 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/DriveThroughTestingCenterModel.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-details.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:maps_launcher/maps_launcher.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:provider/provider.dart';
class CovidDrivethruLocation extends StatefulWidget {
@override
@ -23,6 +26,8 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
String projectName = "";
String projectID = "";
ProjectViewModel projectViewModel;
@override
void initState() {
WidgetsBinding.instance
@ -32,8 +37,9 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return AppScaffold(
appBarTitle: "COVID-19 TEST",
appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true,
body: SingleChildScrollView(
child: Container(
@ -41,8 +47,10 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
child: Column(
children: <Widget>[
Container(
alignment: Alignment.centerLeft,
child: Text("Get The Result During 8 Hours",
alignment: projectViewModel.isArabic
? Alignment.centerRight
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).resultHeader,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 22.0,
@ -50,14 +58,15 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(
"We are using the advance technology to test COVID-19, The sample for examination is taking between the nose and mouth (nasopharyngeal swab), the examination is done by ELITE In Genius of the company ELITECH GROUP MOLECULAR DIAGNOSTICS, Note that the device belongs to an Italian company and is manufactured in Japan with RC- PCR",
child: Text(TranslationBase.of(context).covidInfo,
style: TextStyle(fontSize: 16.0, color: Colors.black)),
),
Container(
margin: EdgeInsets.only(top: 20.0),
alignment: Alignment.centerLeft,
child: Text("Select Location",
alignment: projectViewModel.isArabic
? Alignment.centerRight
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18.0,
@ -79,7 +88,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
margin: EdgeInsets.only(top: 15.0),
child: DropdownButtonHideUnderline(
child: DropdownButton<String>(
hint: new Text("Select Address"),
hint: new Text(TranslationBase.of(context).selectAddress),
value: projectDropdownValue,
items: projectsList.map((item) {
return new DropdownMenuItem<String>(
@ -98,8 +107,10 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
isLocationSelected
? Container(
margin: EdgeInsets.only(top: 15.0),
alignment: Alignment.centerLeft,
child: Text("Selected Location",
alignment: projectViewModel.isArabic
? Alignment.centerRight
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18.0,
@ -150,8 +161,8 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () {
getDirections();
},
child:
Text("GET DIRECTIONS", style: TextStyle(fontSize: 18.0)),
child: Text(TranslationBase.of(context).getDirections,
style: TextStyle(fontSize: 18.0)),
),
),
),
@ -178,7 +189,8 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () {
back();
},
child: Text("BACK", style: TextStyle(fontSize: 18.0)),
child: Text(TranslationBase.of(context).back,
style: TextStyle(fontSize: 18.0)),
),
),
),
@ -201,7 +213,8 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () {
next();
},
child: Text("NEXT", style: TextStyle(fontSize: 18.0)),
child: Text(TranslationBase.of(context).next,
style: TextStyle(fontSize: 18.0)),
),
),
),
@ -258,35 +271,35 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
CovidPaymentInfoResponse covidPaymentInfoResponse =
new CovidPaymentInfoResponse();
GifLoaderDialogUtils.showMyDialog(context);
service
.getCovidPaymentInformation(context, int.parse(projectID))
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(
res['COVID19_PatientShare']);
print(covidPaymentInfoResponse.procedureNameField);
});
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => CovidPaymentDetails(
covidPaymentInfoResponse: covidPaymentInfoResponse,
projectID: int.parse(projectID),
)));
} else {}
})
.catchError((err) {
print(err);
})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => CovidPaymentDetails(
covidPaymentInfoResponse: covidPaymentInfoResponse,
projectID: int.parse(projectID),
)));
});
}
getProjectsList(BuildContext context) {
CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context);
service.getCovidProjectsList(context).then((res) {
print(res);
if (res['MessageStatus'] == 1) {
@ -296,10 +309,11 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
projectsList.add(new DriveThroughTestingCenterModel.fromJson(v));
});
});
GifLoaderDialogUtils.hideDialog(context);
} else {}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
}

@ -23,7 +23,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: "COVID-19 TEST",
appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true,
body: SingleChildScrollView(
child: Container(
@ -57,8 +57,8 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
children: <Widget>[
Container(
margin: EdgeInsets.only(
left: 20.0, right: 20.0, top: 40.0),
child: Text("COVID-19 TEST",
left: 20.0, right: 20.0, top: 20.0),
child: Text(TranslationBase.of(context).covidTest,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
@ -67,7 +67,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
Container(
margin: EdgeInsets.only(
left: 20.0, right: 20.0, top: 10.0),
child: Text("Drive-Thru",
child: Text(TranslationBase.of(context).driveThru,
style: TextStyle(
color: Colors.white, fontSize: 24.0)),
),
@ -88,7 +88,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
alignment: Alignment.center,
margin:
EdgeInsets.only(left: 0.0, right: 20.0, top: 30.0),
child: Text("Test Fees",
child: Text(TranslationBase.of(context).testFee,
style: TextStyle(
color: Colors.black,
fontSize: 22.0,
@ -156,7 +156,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
Container(
alignment: Alignment.center,
margin: EdgeInsets.fromLTRB(20.0, 15.0, 20.0, 5.0),
child: Text("You can pay by following options: ",
child: Text(TranslationBase.of(context).payOptions,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16.0,
@ -197,7 +197,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
onPressed: () {
cancel();
},
child: Text("CANCEL", style: TextStyle(fontSize: 18.0)),
child: Text(TranslationBase.of(context).cancel, style: TextStyle(fontSize: 18.0)),
),
),
),
@ -218,7 +218,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
disabledTextColor: Colors.white,
disabledColor: Colors.grey[500],
onPressed: isAgree ? next : null,
child: Text("NEXT", style: TextStyle(fontSize: 18.0)),
child: Text(TranslationBase.of(context).next, style: TextStyle(fontSize: 18.0)),
),
),
),

@ -365,7 +365,9 @@ class _ToDoState extends State<ToDo> {
color: Color(0xff20bc44),
),
height: 30.0,
margin: projectViewModel.isArabic ? EdgeInsets.fromLTRB(160.0, 0.0, 30.0, 0.0) : EdgeInsets.fromLTRB(30.0, 0.0, 160.0, 0.0),
margin: projectViewModel.isArabic
? EdgeInsets.fromLTRB(160.0, 0.0, 30.0, 0.0)
: EdgeInsets.fromLTRB(30.0, 0.0, 160.0, 0.0),
transform: Matrix4.translationValues(0.0, -8.0, 0.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
@ -385,14 +387,17 @@ class _ToDoState extends State<ToDo> {
),
widget.appoList[index].isLiveCareAppointment
? Container(
child: Text(TranslationBase.of(context).videoAppo,
child: Text(
TranslationBase.of(context).videoAppo,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 12.0)),
)
: Container(
child: Text(TranslationBase.of(context).walkinAppo,
child: Text(
TranslationBase.of(context)
.walkinAppo,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
@ -825,20 +830,25 @@ class _ToDoState extends State<ToDo> {
res['Fort_id'], res['PaymentMethod'], context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
print(res['OnlineCheckInAppointments'][0]);
addAdvancedNumberRequest(
res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
paymentReference,
appo.appointmentNo.toString(),
appo);
appo,
res['OnlineCheckInAppointments'][0]);
}).catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
});
}
addAdvancedNumberRequest(String advanceNumber, String paymentReference,
String appointmentID, AppoitmentAllHistoryResultList appo) {
addAdvancedNumberRequest(
String advanceNumber,
String paymentReference,
String appointmentID,
AppoitmentAllHistoryResultList appo,
dynamic apptData) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service
@ -846,8 +856,25 @@ class _ToDoState extends State<ToDo> {
advanceNumber, paymentReference, appointmentID, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (appo.isLiveCareAppointment)
addVIDARequestInsert(advanceNumber, paymentReference, apptData);
else
getAppoQR(context, appo);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
addVIDARequestInsert(
String advanceNumber, String paymentReference, dynamic apptData) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service
.addVIDARequest(advanceNumber, paymentReference, apptData, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res);
getAppoQR(context, appo);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);

@ -440,7 +440,7 @@ class _HomePageState extends State<HomePage> {
height: 10,
),
Texts(
TranslationBase.of(context).cmcHeading,
TranslationBase.of(context).homeHealthCare,
textAlign: TextAlign.center,
color: Colors.white,
fontWeight: FontWeight.w700,
@ -509,7 +509,7 @@ class _HomePageState extends State<HomePage> {
height:10,
),
Texts(
TranslationBase.of(context).emergencyService,
TranslationBase.of(context).cmcHeading,
textAlign: TextAlign.center,
color: Colors.white,
fontWeight: FontWeight.w700,

@ -3,12 +3,10 @@ import 'package:diplomaticquarterapp/pages/livecare/widgets/LiveCarePendingReque
import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_list.dart';
import 'package:diplomaticquarterapp/pages/livecare/widgets/livecare_logs.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'livecare_type_select.dart';
class LiveCareHome extends StatefulWidget {
static bool showFooterButton = true;
@ -35,7 +33,9 @@ class _LiveCareHomeState extends State<LiveCareHome>
pendingERRequestHistoryList = new ErRequestHistoryList();
WidgetsBinding.instance.addPostFrameCallback((_) => getLiveCareHistory());
WidgetsBinding.instance.addPostFrameCallback((_) {
if (!isDataLoaded) getLiveCareHistory();
});
super.initState();
}
@ -89,6 +89,7 @@ class _LiveCareHomeState extends State<LiveCareHome>
}
void getLiveCareHistory() {
GifLoaderDialogUtils.showMyDialog(context);
setState(() {
isDataLoaded = false;
hasLiveCareRequest = false;
@ -96,38 +97,31 @@ class _LiveCareHomeState extends State<LiveCareHome>
LiveCareService service = new LiveCareService();
PatientERVirtualHistoryResponse patientERVirtualHistoryResponse =
new PatientERVirtualHistoryResponse();
service
.getLivecareHistory(context)
.then((res) {
setState(() {
print(res['ErRequestHistoryList'].length);
if (res['ErRequestHistoryList'].length != 0) {
patientERVirtualHistoryResponse =
PatientERVirtualHistoryResponse.fromJson(res);
erRequestHistoryList =
patientERVirtualHistoryResponse.erRequestHistoryList;
service.getLivecareHistory(context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
setState(() {
print(res['ErRequestHistoryList'].length);
if (res['ErRequestHistoryList'].length != 0) {
patientERVirtualHistoryResponse =
PatientERVirtualHistoryResponse.fromJson(res);
erRequestHistoryList =
patientERVirtualHistoryResponse.erRequestHistoryList;
if (patientERVirtualHistoryResponse
.erRequestHistoryList[0].callStatus <
4) {
pendingERRequestHistoryList =
patientERVirtualHistoryResponse.erRequestHistoryList[0];
hasLiveCareRequest = true;
} else {
hasLiveCareRequest = false;
}
}
});
})
.catchError((err) {
print(err);
})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
setState(() {
isDataLoaded = true;
});
});
if (patientERVirtualHistoryResponse
.erRequestHistoryList[0].callStatus <
4) {
pendingERRequestHistoryList =
patientERVirtualHistoryResponse.erRequestHistoryList[0];
hasLiveCareRequest = true;
} else {
hasLiveCareRequest = false;
}
}
isDataLoaded = true;
});
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
}

@ -36,7 +36,7 @@ class _ScheduleClinicCardState extends State<ScheduleClinicCard> {
child: Text(
widget.languageID == 'ar'
? widget.clinicsHaveScheduleList.clinicDescN != null ? widget.clinicsHaveScheduleList.clinicDescN: ""
: widget.clinicsHaveScheduleList.clinicDesc != null ? widget.clinicsHaveScheduleList.clinicDesc: "Dermatology",
: widget.clinicsHaveScheduleList.clinicDesc != null ? widget.clinicsHaveScheduleList.clinicDesc: "Test Clinic",
style: TextStyle(
fontSize: 16.0,
color:

@ -51,20 +51,19 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
),
Container(
alignment: Alignment.center,
child: Text("LiveCare Service",
child: Text(TranslationBase.of(context).livecareService,
style: TextStyle(
fontWeight: FontWeight.bold, fontSize: 20.0))),
Container(
margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.center,
child: Text(
"is to obtain medical advice with a specialist doctor Via a video call",
TranslationBase.of(context).livecareServiceDesc,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 18.0))),
Container(
margin: EdgeInsets.only(top: 15.0),
alignment: Alignment.centerLeft,
child: Text("WHY LIVECARE?",
child: Text(TranslationBase.of(context).whyLivecare,
style: TextStyle(
fontWeight: FontWeight.bold, fontSize: 20.0))),
Container(
@ -77,7 +76,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
width: MediaQuery.of(context).size.width * 0.72,
margin: EdgeInsets.all(10.0),
child: Text(
"No need to wait, you will get Medical consultation immediately via Video call.",
TranslationBase.of(context).livecarePoint1,
overflow: TextOverflow.clip,
style: TextStyle(fontSize: 14.0)),
)
@ -93,7 +92,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
Container(
width: MediaQuery.of(context).size.width * 0.72,
margin: EdgeInsets.all(10.0),
child: Text("The doctor will see your medical file.",
child: Text(TranslationBase.of(context).docVirtualAppoIns4,
overflow: TextOverflow.clip,
style: TextStyle(fontSize: 14.0)),
)
@ -109,7 +108,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
Container(
width: MediaQuery.of(context).size.width * 0.72,
margin: EdgeInsets.all(10.0),
child: Text("Free Prescription delivery service.",
child: Text(TranslationBase.of(context).docVirtualAppoIns5,
overflow: TextOverflow.clip,
style: TextStyle(fontSize: 14.0)),
)
@ -119,7 +118,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
Container(
margin: EdgeInsets.only(top: 20.0),
child: Text(
"** The service is included with some insurance companies according to the terms and conditions With our best wishes for health and wellness",
TranslationBase.of(context).livecareSummary,
style: TextStyle(fontSize: 16.0))),
InkWell(
onTap: (){
@ -134,7 +133,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
child: Row(
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 20.0),
margin: EdgeInsets.only(left: 10.0, right: 10.0),
child: SvgPicture.asset(
"assets/images/new-design/liveCare_logo_icon_white.svg",
width: 80),
@ -144,7 +143,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
margin: EdgeInsets.fromLTRB(30.0, 20.0, 0.0, 0.0),
child: Column(
children: <Widget>[
Text("Get Medical consultation immediately",
Text(TranslationBase.of(context).livecareOption1,
overflow: TextOverflow.clip,
style: TextStyle(
fontWeight: FontWeight.bold,
@ -152,8 +151,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
color: Colors.white)),
Container(
margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.centerLeft,
child: Text("Instant video call",
child: Text(TranslationBase.of(context).livecareOption2,
style: TextStyle(
fontSize: 18.0, color: Colors.white)),
)
@ -176,19 +174,18 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
child: Row(
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 20.0),
margin: EdgeInsets.only(left: 10.0, right: 10.0),
child: Image.asset(
"assets/images/new-design/calendar.png",
width: 70),
),
Container(
width: MediaQuery.of(context).size.width * 0.58,
margin: EdgeInsets.fromLTRB(30.0, 30.0, 0.0, 0.0),
margin: EdgeInsets.fromLTRB(30.0, 20.0, 0.0, 0.0),
child: Column(
children: <Widget>[
Container(
alignment: Alignment.centerLeft,
child: Text("Book Appointment",
child: Text(TranslationBase.of(context).livecareOption3,
overflow: TextOverflow.clip,
style: TextStyle(
fontWeight: FontWeight.bold,
@ -197,8 +194,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
),
Container(
margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.centerLeft,
child: Text("Schedule Video Call",
child: Text(TranslationBase.of(context).livecareOption4,
style: TextStyle(
fontSize: 18.0, color: Colors.white)),
)

@ -5,11 +5,11 @@ import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class LiveCareHistoryCard extends StatefulWidget {
ErRequestHistoryList erRequestHistoryList;
@ -178,6 +178,7 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
sendInvoiceEmail(context) {
ConfirmDialog.closeAlertDialog(context);
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service
.sendLiveCareInvoiceEmail(
widget.erRequestHistoryList.appointmentNo.toString(),
@ -189,8 +190,7 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
}).catchError((err) {
AppToast.showErrorToast(message: err);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
getAuthenticatedUser() async {

@ -3,9 +3,9 @@ import 'package:diplomaticquarterapp/models/FamilyFiles/PatientERVirtualHistoryR
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class LiveCarePendingRequest extends StatefulWidget {
ErRequestHistoryList pendingERRequestHistoryList;
@ -149,19 +149,17 @@ class _LiveCarePendingRequestState extends State<LiveCarePendingRequest> {
cancelLiveCareRequest() {
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service
.cancelLiveCareRequest(widget.pendingERRequestHistoryList.vCID, context)
.then((res) {
AppToast.showSuccessToast(
message: "LiveCare request cancelled successfully");
})
.catchError((err) {
print(err);
})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
widget.getLiveCareHistory();
});
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(
message: "LiveCare request cancelled successfully");
widget.getLiveCareHistory();
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
}

@ -2,8 +2,8 @@ import 'package:diplomaticquarterapp/models/LiveCare/ClinicsServiceTimingsRespon
import 'package:diplomaticquarterapp/models/LiveCare/LiveCareClinicsListResponse.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'ClinicTimingsDialog.dart';
@ -90,9 +90,11 @@ class _State extends State<ClinicCard> {
getClinicTimings(PatientERGetClinicsList patientERGetClinicsList) {
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service
.getLivecareClinicTiming(patientERGetClinicsList.serviceID, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
clinicsServiceTimingsResponse =
@ -129,8 +131,8 @@ class _State extends State<ClinicCard> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
}

@ -54,6 +54,8 @@ class _clinic_listState extends State<ClinicList> {
MyInAppBrowser browser;
bool isLiveCareTypeSelected = false;
@override
void initState() {
liveCareClinicsListResponse = new LiveCareClinicsListResponse();
@ -61,7 +63,7 @@ class _clinic_listState extends State<ClinicList> {
new LiveCareScheduleClinicsListResponse();
WidgetsBinding.instance.addPostFrameCallback((_) {
openLiveCareSelectionDialog();
if (!isLiveCareTypeSelected) openLiveCareSelectionDialog();
});
getLanguageID();
@ -431,6 +433,7 @@ class _clinic_listState extends State<ClinicList> {
Navigator.pop(context);
} else {
print(value);
isLiveCareTypeSelected = true;
if (value == "immediate") {
setState(() {
currentSelectedLiveCareType = "immediate";

@ -12,7 +12,6 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:rating_bar/rating_bar.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class AskDoctorPage extends StatelessWidget {
@override

@ -20,7 +20,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import '../../../core/model/my_balance/AdvanceModel.dart';
import 'confirm_payment_page.dart';

@ -3,9 +3,9 @@ import 'dart:io';
import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/health_data_list.dart';
import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:url_launcher/url_launcher.dart';
class SmartWatchInstructions extends StatefulWidget {
@ -796,7 +796,9 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
getLastPatientRecord(BuildContext context) {
SmartWatchIntegrationService service = new SmartWatchIntegrationService();
GifLoaderDialogUtils.showMyDialog(context);
service.getLastPatientRecord(context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
print(res['Med_GetPatientLastRecordList']);
setState(() {
@ -807,9 +809,9 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
});
} else {}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
_openHealthDataList() {

@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/models/Request.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:flutter/cupertino.dart';
class DoctorsListService extends BaseService {
@ -934,6 +935,64 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> addVIDARequest(String advanceNumber,
String paymentReference, dynamic apptData, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"AdvanceNumber": advanceNumber,
"PaymentReferenceNumber": paymentReference,
"AppointmentNo": apptData.AppointmentNo,
"AcceptedBy": apptData.DoctorID,
"ServiceID": apptData.ServiceID,
"ProjectID": apptData.ProjectID,
"ClinicID": apptData.ClinicID,
"ClientRequestID": Utils.getAppointmentTransID(
apptData.ProjectID, apptData.ClinicID, apptData.AppointmentNo),
"AppointmentDate": apptData.AppointmentDate,
"DeviceType": Platform.isIOS ? "iOS" : "Android",
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
"SessionID": "YckwoXhUmWBsnHKEKig",
"isDentalAllowedBackend": false,
"DeviceTypeID": req.DeviceTypeID,
"PatientID": authUser.patientID,
"TokenID": "@dm!n",
"PatientTypeID": authUser.patientType,
"PatientType": authUser.patientType
};
// request.DeviceToken = this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false);
// request.Latitude = this.cs.sharedService.getSharedData('userLat', false);
// request.Longitude = this.cs.sharedService.getSharedData('userLong', false);
// request.ServiceID = apptData.ServiceID;
// request.ProjectID = apptData.ProjectID;
// request.ClinicID = apptData.ClinicID;
// request.ClientRequestID = AppointmentModel.getAppointmentTransID(apptData);
// request.AppointmentDate = apptData.AppointmentDate;
// request.DeviceType = this.getDeviceType();
// request.VoipToken = this.platform.is('ios') ? this.cs.sharedService.getSharedData(AuthenticationService.APNS_TOKEN, false) : "";
dynamic localRes;
await baseAppClient.post(ADD_VIDA_REQUEST,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> isAllowedToAskDoctor(int docID, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -1109,14 +1168,16 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getPatientLabOrdersByAppoNo(dynamic appoNo, dynamic projID, dynamic clinicID, BuildContext context) async {
Future<Map> getPatientLabOrdersByAppoNo(dynamic appoNo, dynamic projID,
dynamic clinicID, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"AppointmentNo": appoNo,
@ -1140,10 +1201,10 @@ class DoctorsListService extends BaseService {
dynamic localRes;
await baseAppClient.post(GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}

@ -999,14 +999,74 @@ class TranslationBase {
String get convertCholesterolStatement => localizedValues["convertCholesterolStatement"][locale.languageCode];
String get triglyceridesConvertStatement => localizedValues["triglyceridesConvertStatement"][locale.languageCode];
String get bloodDEnterDesc => localizedValues["bloodD-enter-desc"][locale.languageCode];
String get bloodDEnterDesc =>
localizedValues["bloodD-enter-desc"][locale.languageCode];
String get viewTermsConditions => localizedValues["viewTermsConditions"][locale.languageCode];
String get generalHealth => localizedValues["generalHealth"][locale.languageCode];
String get womanHealth => localizedValues["womanHealth"][locale.languageCode];
String get bmi => localizedValues["bmi"][locale.languageCode];
String get calcHealth => localizedValues["calc-health"][locale.languageCode];
String get calories => localizedValues["calories"][locale.languageCode];
String get bmr => localizedValues["bmr"][locale.languageCode];
String get idealBody => localizedValues["idealBody"][locale.languageCode];
String get bodyWord => localizedValues["body_word"][locale.languageCode];
String get fat => localizedValues["fat"][locale.languageCode];
String get carbohydrate => localizedValues["carbohydrate"][locale.languageCode];
String get proteinFat => localizedValues["proteinFat"][locale.languageCode];
String get ovulation => localizedValues["ovulation"][locale.languageCode];
String get delivery => localizedValues["delivery"][locale.languageCode];
String get bmiCalcDesc => localizedValues["bmiCalcDesc"][locale.languageCode];
String get selectUnit => localizedValues["selectUnit"][locale.languageCode];
String get feet => localizedValues["feet"][locale.languageCode];
String get pound => localizedValues["pound"][locale.languageCode];
String get seeListOfDoctor => localizedValues["seeListOfDoctor"][locale.languageCode];
String get obese => localizedValues["obese"][locale.languageCode];
String get overWeight => localizedValues["overWeight"][locale.languageCode];
String get healthy => localizedValues["healthy"][locale.languageCode];
String get underWeight => localizedValues["underWeight"][locale.languageCode];
String get bmiCalcMsgObese => localizedValues["bmiCalcMsgObese"][locale.languageCode];
String get bmiCalcMsgOverweight => localizedValues["bmiCalcMsgOverweight"][locale.languageCode];
String get bmiCalcMsgHealthy => localizedValues["bmiCalcMsgHealthy"][locale.languageCode];
String get bmiCalcMsgUnderWeight => localizedValues["bmiCalcMsgUnderWeight"][locale.languageCode];
String get bariatrics => localizedValues["bariatrics"][locale.languageCode];
String get bariatricsHeaderMsg => localizedValues["bariatricsHeaderMsg"][locale.languageCode];
String get continues => localizedValues["continue"][locale.languageCode];
String get skip => localizedValues["skip"][locale.languageCode];
String get calorieCalcDesc => localizedValues["calorieCalcDesc"][locale.languageCode];
String get age11_120Years => localizedValues["age11_120_years"][locale.languageCode];
String get walkinAppo => localizedValues["WalkinAppo"][locale.languageCode];
String get videoAppo => localizedValues["videoAppo"][locale.languageCode];
String get weightAdd => localizedValues["weight-add"][locale.languageCode];
String get systolicAdd => localizedValues["systolic-add"][locale.languageCode];
String get diastolicAdd => localizedValues["systolic-add"][locale.languageCode];
String get cmcHeading => localizedValues["cmc-heading"][locale.languageCode];
String get selectLocation => localizedValues["select-location"][locale.languageCode];
String get resultHeader => localizedValues["result-header"][locale.languageCode];
String get covidInfo => localizedValues["covid-info"][locale.languageCode];
String get selectAppo => localizedValues["select-appo"][locale.languageCode];
String get covidAlertHeader => localizedValues["covid-alert-header"][locale.languageCode];
String get covidAlertInfo => localizedValues["covid-alert-info"][locale.languageCode];
String get covidAlertMins => localizedValues["covid-alert-mins"][locale.languageCode];
String get back => localizedValues["back"][locale.languageCode];
String get getDirections => localizedValues["get-directions"][locale.languageCode];
String get selectedLocation => localizedValues["selected-location"][locale.languageCode];
String get testFee => localizedValues["test-fee"][locale.languageCode];
String get payOptions => localizedValues["pay-options"][locale.languageCode];
String get livecareService => localizedValues["livecare-service"][locale.languageCode];
String get livecareServiceDesc => localizedValues["livecare-service-desc"][locale.languageCode];
String get whyLivecare => localizedValues["why-livecare"][locale.languageCode];
String get livecarePoint1 => localizedValues["livecare-point-1"][locale.languageCode];
String get docVirtualAppoIns4 => localizedValues["doc-virtual-appo-ins4"][locale.languageCode];
String get docVirtualAppoIns5 => localizedValues["doc-virtual-appo-ins5"][locale.languageCode];
String get livecareSummary => localizedValues["livecare-summary"][locale.languageCode];
String get livecareOption1 => localizedValues["livecare-option-1"][locale.languageCode];
String get livecareOption2 => localizedValues["livecare-option-2"][locale.languageCode];
String get livecareOption3 => localizedValues["livecare-option-3"][locale.languageCode];
String get livecareOption4 => localizedValues["livecare-option-4"][locale.languageCode];
String get today => localizedValues["today"][locale.languageCode];
String get week => localizedValues["week"][locale.languageCode];
@ -1032,7 +1092,6 @@ class TranslationBase {
String get ml => localizedValues["ml"][locale.languageCode];
String get l => localizedValues["l"][locale.languageCode];
String get customLabel => localizedValues["custom-label"][locale.languageCode];
String get selectUnit => localizedValues["select-unit"][locale.languageCode];
String get customLabelInLitres => localizedValues["custom-label-in-litres"][locale.languageCode];
String get customLabelInMililitres => localizedValues["custom-label-in-mililitres"][locale.languageCode];
String get amount_ => localizedValues["amount"][locale.languageCode];

@ -8,17 +8,17 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
class MyInAppBrowser extends InAppBrowser {
// 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
'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String PREAUTH_SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
// static String SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
static String PREAUTH_SERVICE_URL =
'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
// static String PREAUTH_SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
static List<String> successURLS = [
'success',

@ -1,53 +1,41 @@
import 'dart:collection';
import 'dart:convert';
import 'dart:math';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/DoctorProfile.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
import 'package:diplomaticquarterapp/pages/ErService/NearestEr.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/medical/my_admissions_page.dart';
import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_tts/flutter_tts.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:speech_to_text/speech_recognition_error.dart';
import 'package:speech_to_text/speech_recognition_result.dart';
import 'package:speech_to_text/speech_to_text.dart';
import 'package:diplomaticquarterapp/widgets/robo-search/robosearch.dart';
import 'dart:math';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
class BottomBarSearch extends StatefulWidget {
@override
@ -76,6 +64,7 @@ class _SearchBot extends State<BottomBarSearch> {
bool _isInit = true;
TextEditingController searchController = TextEditingController();
@override
void initState() {
requestPermissions();
@ -432,10 +421,12 @@ class _SearchBot extends State<BottomBarSearch> {
List<String> arr = [];
List<String> arrDistance = [];
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service
.getDoctorsList(clinicId, projectId, false, context,
doctorId: doctorId, doctorName: doctorName)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
if (res['SearchDoctorsByTime_IsVoiceCommandList'] != null &&
@ -483,9 +474,9 @@ class _SearchBot extends State<BottomBarSearch> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
Future navigateToDoctorProfile(context, docObject, docProfile,

@ -40,6 +40,7 @@ import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/robo-search/robosearch.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -54,8 +55,6 @@ import 'package:speech_to_text/speech_to_text.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/DoctorProfile.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:flutter/cupertino.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:url_launcher/url_launcher.dart';
class FloatingSearchButton extends StatefulWidget {
@ -734,10 +733,12 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
List<String> arr = [];
List<String> arrDistance = [];
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service
.getDoctorsList(clinicId, projectId, isNearest, context,
doctorId: doctorId, doctorName: doctorName)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
if (res['SearchDoctorsByTime_IsVoiceCommandList'] != null &&
@ -785,9 +786,9 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
Future navigateToDoctorProfile(context, docObject, docProfile,

@ -111,8 +111,6 @@ dependencies:
#Circular progress bar for reverse timer
circular_countdown_timer: ^0.0.5
smart_progress_bar: ^0.1.6
#Just Audio to play ringing for incoming video call
just_audio: ^0.3.4
@ -191,6 +189,7 @@ flutter:
- assets/images/login/
- assets/images/SmartWatches/
- assets/images/DQ/
- assets/images/BMI/
- assets/json/
- assets/sounds/
- assets/images/svg/

Loading…
Cancel
Save