Merge branch 'development' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into sultan-patientapp

merge-requests/251/head
Sultan Khan 4 years ago
commit 144ef52c70

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

@ -241,6 +241,9 @@ const IS_ALLOW_ASK_DOCTOR =
'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_CALL_REQUEST_TYPE = const GET_CALL_REQUEST_TYPE =
'Services/Doctors.svc/REST/GetCallRequestType_LOV'; 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const ADD_VIDA_REQUEST =
'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart';
const SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo'; const SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo';
const GET_LIVECARE_CLINICS = const GET_LIVECARE_CLINICS =
@ -289,7 +292,7 @@ const GET_PATIENT_HEALTH_STATS =
const CHANNEL = 3; const CHANNEL = 3;
const GENERAL_ID = 'Cs2020@2016\$2958'; const GENERAL_ID = 'Cs2020@2016\$2958';
const IP_ADDRESS = '10.20.10.20'; const IP_ADDRESS = '10.20.10.20';
const VERSION_ID = 8.4; const VERSION_ID = 6.1;
const SETUP_ID = '91877'; const SETUP_ID = '91877';
const LANGUAGE = 2; const LANGUAGE = 2;
const PATIENT_OUT_SA = 0; const PATIENT_OUT_SA = 0;
@ -535,6 +538,10 @@ const GET_SUB_CATEGORISE =
const GET_SUB_PRODUCTS = 'products?categoryid='; const GET_SUB_PRODUCTS = 'products?categoryid=';
const GET_FINAL_PRODUCTS = 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; const TIMER_MIN = 10;

@ -877,7 +877,7 @@ const Map localizedValues = {
"en": "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.", "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": "البريد الالكتروني"}, "email": {"en": "Email", "ar": "البريد الالكتروني"},
"Book": {"en": "Book", "ar": "احجز"}, "Book": {"en": "Book", "ar": "احجز"},
@ -1695,7 +1695,77 @@ const Map localizedValues = {
}, },
"videoAppo": {"en": "Video Call Appointment", "ar": "موعد اتصال فيديو"}, "videoAppo": {"en": "Video Call Appointment", "ar": "موعد اتصال فيديو"},
// "visit": {"en" : "Visit", "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": "أدخل الوزن "}, "weight-add": {"en": "Enter Weight Value", "ar": "أدخل الوزن "},
"systolic-add": {"en": "Enter Systolic Value", "ar": "أدخل قيمة الإنقباض "}, "systolic-add": {"en": "Enter Systolic Value", "ar": "أدخل قيمة الإنقباض "},
"diastolic-add": {"en": "Enter Diastolic Value", "ar": "أدخل قيمة الإنبساط "}, "diastolic-add": {"en": "Enter Diastolic Value", "ar": "أدخل قيمة الإنبساط "},
@ -1769,6 +1839,74 @@ const Map localizedValues = {
"en": "Please enter verification code", "en": "Please enter verification code",
"ar": "الرجاء إدخال رمز التحقق" "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": "اتصال فيديو مجدول"},
"sms_code": {"en": "Enter SMS Code here", "ar": "أدخل رمز التحقق هنا"}, "sms_code": {"en": "Enter SMS Code here", "ar": "أدخل رمز التحقق هنا"},
"code_failure": { "code_failure": {
"en": "Didnt received the code", "en": "Didnt received the code",
@ -1785,5 +1923,8 @@ const Map localizedValues = {
"ar": "اختر الوحدة المفضلة" "ar": "اختر الوحدة المفضلة"
}, },
"select-unit": {"en": "Select unit", "ar": "اختر وحدة القياس"}, "select-unit": {"en": "Select unit", "ar": "اختر وحدة القياس"},
"try-saying": {"en": "Try saying something", "ar": 'حاول قول شيء ما'} "try-saying": {"en": "Try saying something", "ar": 'حاول قول شيء ما'},
"app-update": {"en": "UPDATE THE APP", "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;
}
}

@ -77,9 +77,9 @@ class CustomerAddressesService extends BaseService {
class CustomerInfo { class CustomerInfo {
bool isRegistered; bool isRegistered;
String userName; String userName;
Null password; dynamic password;
String email; String email;
Null errorMessage; dynamic errorMessage;
String mobileNumber; String mobileNumber;
int customerId; int customerId;
@ -121,19 +121,19 @@ class AddressInfo {
String firstName; String firstName;
String lastName; String lastName;
String email; String email;
Null company; dynamic company;
int countryId; int countryId;
String country; String country;
Null stateProvinceId; dynamic stateProvinceId;
String city; String city;
String address1; String address1;
String address2; String address2;
String zipPostalCode; String zipPostalCode;
String phoneNumber; String phoneNumber;
Null faxNumber; dynamic faxNumber;
String customerAttributes; String customerAttributes;
String createdOnUtc; String createdOnUtc;
Null province; dynamic province;
String latLong; String latLong;
AddressInfo( AddressInfo(

@ -0,0 +1,76 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/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);
}
}

@ -44,11 +44,16 @@ class BaseAppClient {
} }
try { try {
//Map profile = await sharedPref.getObj(DOCTOR_PROFILE); //Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
var pharmacyToken = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN);
var user = await sharedPref.getObject(USER_PROFILE);
Map<String, String> headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
};
if (!isExternal) { if (!isExternal) {
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
print(await sharedPref.getString(APP_LANGUAGE)); var languageID =
var languageID = await sharedPref.getString(APP_LANGUAGE) ?? 'ar'; await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var user = await sharedPref.getObject(USER_PROFILE);
if (body.containsKey('SetupID')) { if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID') body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null ? body['SetupID'] != null
@ -102,22 +107,25 @@ class BaseAppClient {
? body['PatientID'] ? body['PatientID']
: user['PatientID']; : user['PatientID'];
body['PatientOutSA'] = user['OutSA']; body['PatientOutSA'] = user['OutSA'];
body['SessionID'] = SESSION_ID; //getSessionId(token); body['SessionID'] = SESSION_ID; //getSe
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': pharmacyToken,
'Mobilenumber': user['MobileNumber'].toString(),
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user['PatientID'].toString(),
};
} }
} }
} }
print("URL : $url"); print("URL : $url");
print("Body : ${json.encode(body)}"); print("Body : ${json.encode(body)}");
var ss = json.encode(body);
if (await Utils.checkConnection()) { if (await Utils.checkConnection()) {
final response = await http.post(url.trim(), final response = await http.post(url.trim(),
body: json.encode(body), body: json.encode(body), headers: headers);
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
});
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
print("statusCode :$statusCode"); print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode < 200 || statusCode >= 400 || json == null) {
@ -155,11 +163,21 @@ class BaseAppClient {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} else if (parsed['MessageStatus'] == 2 && } else if (parsed['MessageStatus'] == 2 &&
parsed['IsAuthenticated']) { 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( onFailure(
parsed['message'] ?? parsed['message'] ??
parsed['ErrorEndUserMessage'] ?? parsed['ErrorEndUserMessage'] ??
parsed['ErrorMessage'], parsed['ErrorMessage'],
statusCode); statusCode);
}
} else if (!parsed['IsAuthenticated']) { } else if (!parsed['IsAuthenticated']) {
await logout(); await logout();
@ -256,15 +274,6 @@ class BaseAppClient {
var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN);
var user = await sharedPref.getObject(USER_PROFILE); var user = await sharedPref.getObject(USER_PROFILE);
Map test = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': token,
'Mobilenumber': user['MobileNumber'].toString(),
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user['PatientID'].toString(),
};
if (await Utils.checkConnection()) { if (await Utils.checkConnection()) {
final response = await http.get(url.trim(), headers: { final response = await http.get(url.trim(), headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',

@ -67,6 +67,7 @@ class PharmacyModuleService extends BaseService {
} }
Future generatePharmacyToken() async { Future generatePharmacyToken() async {
await getUser();
Map<String, String> queryParams = { Map<String, String> queryParams = {
'Filenumber':user.patientID.toString(), 'Filenumber':user.patientID.toString(),
'MobileNumber':user.mobileNumber, 'MobileNumber':user.mobileNumber,

@ -0,0 +1,48 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.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);
}
}
}

@ -0,0 +1,26 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import '../../locator.dart';
class PrescriptionDeliveryViewModel extends BaseViewModel{
CustomerAddressesService _customerAddressesService = locator<CustomerAddressesService>();
List<AddressInfo> get addressesList => _customerAddressesService.addressesList;
Future getCustomerAddresses() async {
setState(ViewState.Busy);
await _customerAddressesService.getCustomerAddresses(
);
if (_customerAddressesService.hasError) {
error = _customerAddressesService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
}

@ -22,6 +22,7 @@ import 'package:get_it/get_it.dart';
import 'core/service/AlHabibMedicalService/cmc_service.dart'; import 'core/service/AlHabibMedicalService/cmc_service.dart';
import 'core/service/AlHabibMedicalService/customer_addresses_service.dart'; import 'core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'core/service/AlHabibMedicalService/e_referral_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/AlHabibMedicalService/home_health_care_service.dart';
import 'core/service/AuthenticatedUserObject.dart'; import 'core/service/AuthenticatedUserObject.dart';
import 'core/service/appointment_rate_service.dart'; import 'core/service/appointment_rate_service.dart';
@ -71,6 +72,8 @@ import 'core/service/parmacyModule/parmacy_module_service.dart';
import 'core/service/offers_service.dart'; import 'core/service/offers_service.dart';
import 'core/service/pharmacy_categorise_service.dart'; import 'core/service/pharmacy_categorise_service.dart';
import 'core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart';
import 'core/viewModels/PrescriptionDeliveryViewModel.dart';
import 'core/viewModels/TermsConditionsViewModel.dart'; import 'core/viewModels/TermsConditionsViewModel.dart';
import 'core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; import 'core/viewModels/all_habib_medical_services/e_referral_view_model.dart';
import 'core/viewModels/appointment_rate_view_model.dart'; import 'core/viewModels/appointment_rate_view_model.dart';
@ -217,6 +220,7 @@ void setupLocator() {
locator.registerLazySingleton(() => PrivilegeService()); locator.registerLazySingleton(() => PrivilegeService());
locator.registerLazySingleton(() => WeatherService()); locator.registerLazySingleton(() => WeatherService());
locator.registerLazySingleton(() => TermsConditionsService()); locator.registerLazySingleton(() => TermsConditionsService());
locator.registerLazySingleton(() => BariatricsService());
/// View Model /// View Model
locator.registerFactory(() => HospitalViewModel()); locator.registerFactory(() => HospitalViewModel());
@ -259,6 +263,7 @@ void setupLocator() {
locator.registerFactory(() => EyeViewModel()); locator.registerFactory(() => EyeViewModel());
locator.registerFactory(() => ActiveMedicationsViewModel()); locator.registerFactory(() => ActiveMedicationsViewModel());
locator.registerFactory(() => AskDoctorViewModel()); locator.registerFactory(() => AskDoctorViewModel());
locator.registerFactory(() => PrescriptionDeliveryViewModel());
locator.registerFactory(() => AllergiesViewModel()); locator.registerFactory(() => AllergiesViewModel());
locator.registerFactory(() => HomeHealthCareViewModel()); locator.registerFactory(() => HomeHealthCareViewModel());
@ -280,6 +285,7 @@ void setupLocator() {
//pharmacy //pharmacy
locator.registerFactory(() => PharmacyCategoriseViewModel()); locator.registerFactory(() => PharmacyCategoriseViewModel());
locator.registerFactory(() => OffersCategoriseViewModel()); locator.registerFactory(() => OffersCategoriseViewModel());
locator.registerFactory(() => BariatricsViewModel());
// Offer And Packages // Offer And Packages
//---------------------- //----------------------

@ -43,7 +43,7 @@ class _CMCPageState extends State<CMCPage>
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
description:TranslationBase.of(context).infoCMC, 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, appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup,
body: Scaffold( body: Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,

@ -1,5 +1,6 @@
import 'dart:ui'; 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/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
@ -37,13 +38,14 @@ class _HomeHealthCarePageState extends State<HomeHealthCarePage>
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<HomeHealthCareViewModel>( return BaseView<HomeHealthCareViewModel>(
onModelReady: (model){ onModelReady: (model){
// model.getHHCAllServices();
model.getHHCAllPresOrders(); model.getHHCAllPresOrders();
}, },
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
description: TranslationBase.of(context).HHCNotAuthMsg, description: TranslationBase.of(context).HHCNotAuthMsg,
appBarTitle: TranslationBase.of(context).homeHealthCare, appBarTitle: TranslationBase.of(context).homeHealthCare,
imagesInfo: [ImagesInfo(imageAr: 'assets/images/Wifi-AR.png',imageEn: 'assets/images/wifi-EN.png', isAsset: true)],
body: Scaffold( body: Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
appBar: PreferredSize( 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/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -27,6 +28,7 @@ class _BMICalculatorState extends State<BMICalculator> {
Color ftCard = inactiveCardColor; Color ftCard = inactiveCardColor;
Color lbCard = inactiveCardColor; Color lbCard = inactiveCardColor;
Color kgCard = activeCardColor; Color kgCard = activeCardColor;
void updateColor(int type) { void updateColor(int type) {
//MG/DLT card //MG/DLT card
if (type == 1) { if (type == 1) {
@ -84,31 +86,27 @@ class _BMICalculatorState extends State<BMICalculator> {
return bmiResult; return bmiResult;
} }
void showTextResult() { void showTextResult(BuildContext context) {
if (bmiResult >= 30) { if (bmiResult >= 30) {
textResult = 'Obese'; textResult = TranslationBase.of(context).obese;
} else if (bmiResult < 30 && bmiResult >= 25) { } else if (bmiResult < 30 && bmiResult >= 25) {
textResult = 'OverWeight'; textResult = TranslationBase.of(context).overWeight;
} else if (bmiResult < 25 && bmiResult >= 18.5) { } else if (bmiResult < 25 && bmiResult >= 18.5) {
textResult = 'Healthy'; textResult = TranslationBase.of(context).healthy;
} else if (bmiResult < 18.5) { } else if (bmiResult < 18.5) {
textResult = 'UnderWeight'; textResult = TranslationBase.of(context).underWeight;
} }
} }
void showMsg() { void showMsg(BuildContext context) {
if (bmiResult >= 30) { if (bmiResult >= 30) {
msg = msg = TranslationBase.of(context).bmiCalcMsgObese;
'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.';
} else if (bmiResult < 30 && bmiResult >= 25) { } else if (bmiResult < 30 && bmiResult >= 25) {
msg = msg = TranslationBase.of(context).bmiCalcMsgOverweight;
'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 ';
} else if (bmiResult < 25 && bmiResult >= 18.5) { } else if (bmiResult < 25 && bmiResult >= 18.5) {
msg = msg = TranslationBase.of(context).bmiCalcMsgHealthy;
'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.';
} else if (bmiResult < 18.5) { } else if (bmiResult < 18.5) {
msg = msg = TranslationBase.of(context).bmiCalcMsgUnderWeight;
'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.';
} }
} }
@ -121,26 +119,28 @@ class _BMICalculatorState extends State<BMICalculator> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'BMI Calculator', isShowDecPage: false,
appBarTitle:
"${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Center( Center(
child: Container( child: Container(
width: 350.0, margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(vertical: 15.0), padding: EdgeInsets.symmetric(vertical: 15.0),
child: Text( 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), style: TextStyle(fontSize: 18.0),
), ),
), ),
), ),
), ),
Container( Container(
height: 200.0, margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
width: 350.0, padding: EdgeInsets.only(bottom: 16),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
@ -151,7 +151,7 @@ class _BMICalculatorState extends State<BMICalculator> {
children: [ children: [
Padding( Padding(
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
child: Texts('Height'), child: Texts(TranslationBase.of(context).height),
), ),
], ],
), ),
@ -241,7 +241,7 @@ class _BMICalculatorState extends State<BMICalculator> {
children: [ children: [
Padding( Padding(
padding: EdgeInsets.all(8.0), 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( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
vertical: 0.0, horizontal: 18.0), 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( child: Padding(
padding: padding:
const EdgeInsets.symmetric(horizontal: 16.0), 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, height: 25.0,
), ),
Container( Container(
height: 200.0, margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
width: 350.0, padding: EdgeInsets.only(bottom: 16),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
@ -327,7 +329,7 @@ class _BMICalculatorState extends State<BMICalculator> {
children: [ children: [
Padding( Padding(
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
child: Texts('Weight'), child: Texts(TranslationBase.of(context).weight),
), ),
], ],
), ),
@ -417,7 +419,7 @@ class _BMICalculatorState extends State<BMICalculator> {
children: [ children: [
Padding( Padding(
padding: EdgeInsets.all(8.0), 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( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
vertical: 0.0, horizontal: 18.0), 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( child: Padding(
padding: padding:
const EdgeInsets.symmetric(horizontal: 16.0), 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, height: 25.0,
), ),
Container( Container(
height: 50.0, margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
width: 350.0, padding: EdgeInsets.symmetric(vertical: 8),
child: SecondaryButton( child: SecondaryButton(
label: 'CALCULATE', label: TranslationBase.of(context).calculate,
onTap: () => { onTap: () => {
setState(() { setState(() {
calculateBMI(); calculateBMI();
showTextResult(); showTextResult(context);
showMsg(); showMsg(context);
{ {
Navigator.push( Navigator.push(
context, context,

@ -1,5 +1,9 @@
import 'dart:ffi'; 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/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -12,6 +16,7 @@ class ResultPage extends StatelessWidget {
final String msg; final String msg;
ResultPage({this.finalResult, this.textResult, this.msg}); ResultPage({this.finalResult, this.textResult, this.msg});
Color inductorColor; Color inductorColor;
double percent; double percent;
@ -45,14 +50,17 @@ class ResultPage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: "BMI Calculator", appBarTitle:
"${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}",
body: Column( body: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
SizedBox( Expanded(
// height: 40.0, child: SingleChildScrollView(
), child: Column(
Center( children: [
Container(
margin: EdgeInsets.only(top: 50),
child: Center(
child: CircularPercentIndicator( child: CircularPercentIndicator(
radius: 220.0, radius: 220.0,
lineWidth: 20.0, lineWidth: 20.0,
@ -83,15 +91,33 @@ class ResultPage extends StatelessWidget {
backgroundColor: Colors.white, backgroundColor: Colors.white,
), ),
), ),
),
Container( Container(
height: 120, margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
width: 280.0,
child: Texts(msg), child: Texts(msg),
), ),
],
),
),
),
Container( Container(
width: 350, margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: Button( child: BorderedButton(
label: 'See List Of Doctors', 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) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false,
appBarTitle: 'Bmr Calculator', appBarTitle: 'Bmr Calculator',
body: Padding( body: Padding(
padding: EdgeInsets.symmetric(horizontal: 25.0, vertical: 15.0), 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/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -29,6 +30,7 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
int weight = 0; int weight = 0;
double calories; double calories;
String dropdownValue; String dropdownValue;
void updateColor(int type) { void updateColor(int type) {
//MG/DLT card //MG/DLT card
if (type == 1) { if (type == 1) {
@ -102,31 +104,32 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'Calorie Calculator', isShowDecPage: false,
body: Padding( appBarTitle:
padding: const EdgeInsets.symmetric(horizontal: 25.0, vertical: 15.0), "${TranslationBase.of(context).calories} ${TranslationBase.of(context).calcHealth}",
body: Column(
children: [
Expanded(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
height: 890.0, margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0),
child: Column( child: Column(
//mainAxisAlignment: MainAxisAlignment.start, //mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding( Texts(
padding: const EdgeInsets.all(10.0), TranslationBase.of(context).calorieCalcDesc,
child: Texts(
'Calculates daily calorie intake based on several factors, like height, weight, age, gender and daily physical activity rate',
), ),
SizedBox(
height: 8.0,
), ),
Padding( Texts(TranslationBase.of(context).gender),
padding: SizedBox(
EdgeInsets.symmetric(horizontal: 10.0, vertical: 15.0), height: 8.0,
child: Texts('Gender'),
), ),
Container( Container(
width: 350,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(35.0), borderRadius: BorderRadius.circular(30.0),
color: Colors.white, color: Colors.white,
border: Border.all( border: Border.all(
color: Colors.black45, color: Colors.black45,
@ -134,7 +137,8 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
GestureDetector( Expanded(
child: GestureDetector(
onTap: () { onTap: () {
setState(() { setState(() {
updateColor(1); updateColor(1);
@ -142,16 +146,19 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
}); });
}, },
child: Container( child: Container(
height: 55.0, padding: EdgeInsets.symmetric(vertical: 16),
width: 170.0,
decoration: BoxDecoration( decoration: BoxDecoration(
color: maleCard, color: maleCard,
borderRadius: BorderRadius.circular(35.0), borderRadius: BorderRadius.circular(30.0),
),
child: Center(
child: Texts(
TranslationBase.of(context).female)),
), ),
child: Center(child: Texts('FEMALE')),
), ),
), ),
GestureDetector( Expanded(
child: GestureDetector(
onTap: () { onTap: () {
setState(() { setState(() {
updateColor(2); updateColor(2);
@ -159,32 +166,29 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
}); });
}, },
child: Container( child: Container(
height: 55.0, padding: EdgeInsets.symmetric(vertical: 16),
width: 170.0,
decoration: BoxDecoration( decoration: BoxDecoration(
color: femaleCard, color: femaleCard,
borderRadius: BorderRadius.circular(35.0), borderRadius: BorderRadius.circular(30.0),
),
child: Center(
child: Texts(
TranslationBase.of(context).male)),
), ),
child: Center(child: Texts('MALE')),
), ),
), ),
], ],
), ),
), ),
SizedBox( SizedBox(
height: 15.0, height: 12.0,
), ),
Texts( Texts(
'The Age ( 11 - 120 ) yrs', TranslationBase.of(context).age11_120Years,
),
SizedBox(
height: 10.0,
), ),
Row(
children: [
Container( Container(
width: 340.0, margin:
height: 60.0, EdgeInsets.symmetric(horizontal: 4.0, vertical: 12.0),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
), ),
@ -195,7 +199,7 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
vertical: 10.0, horizontal: 8.0), vertical: 10.0, horizontal: 8.0),
child: Center( child: Center(
child: Container( child: Container(
width: 60.0, width: 60,
foregroundDecoration: BoxDecoration( foregroundDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(5.0), borderRadius: BorderRadius.circular(5.0),
border: Border.all( border: Border.all(
@ -206,12 +210,16 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Padding(
padding: const EdgeInsets.all(4.0),
child: Center( child: Center(
child: Text(age.toString()), child: Text(age.toString()),
), ),
), ),
),
Container( Container(
height: 38.0, padding:
EdgeInsets.symmetric(horizontal: 4),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
@ -274,16 +282,12 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
], ],
), ),
), ),
],
),
Texts( Texts(
'Height', TranslationBase.of(context).height,
), ),
Row(
children: [
Container( Container(
width: 340.0, margin:
height: 60.0, EdgeInsets.symmetric(horizontal: 4.0, vertical: 12.0),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
), ),
@ -305,12 +309,16 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Padding(
padding: const EdgeInsets.all(4.0),
child: Center( child: Center(
child: Text(height.toString()), child: Text(height.toString()),
), ),
), ),
),
Container( Container(
height: 38.0, padding:
EdgeInsets.symmetric(horizontal: 4.0),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
@ -373,32 +381,33 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
], ],
), ),
), ),
], Texts(
TranslationBase.of(context).selectUnit,
), ),
Texts('Select Unit'),
SizedBox( SizedBox(
height: 5.0, height: 8.0,
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
GestureDetector( Expanded(
child: GestureDetector(
onTap: () { onTap: () {
setState(() { setState(() {
updateColorHeight(1); updateColorHeight(1);
}); });
}, },
child: Container( child: Container(
height: 55.0, padding: EdgeInsets.all(12),
width: 150.0, margin: EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration( decoration: BoxDecoration(
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: offset: Offset(
Offset(0, 3), // changes position of shadow 0, 3), // changes position of shadow
), ),
], ],
color: cmCard, color: cmCard,
@ -407,19 +416,21 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
vertical: 0.0, horizontal: 18.0), vertical: 0.0, horizontal: 18.0),
child: Center(child: Texts('CM')), child: Center(child: Texts(TranslationBase.of(context).cm)),
),
), ),
), ),
), ),
GestureDetector( Expanded(
child: GestureDetector(
onTap: () { onTap: () {
setState(() { setState(() {
updateColorHeight(2); updateColorHeight(2);
}); });
}, },
child: Container( child: Container(
height: 55.0, padding: EdgeInsets.all(12),
width: 150.0, margin: EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration( decoration: BoxDecoration(
color: ftCard, color: ftCard,
borderRadius: BorderRadius.circular(3.0), borderRadius: BorderRadius.circular(3.0),
@ -428,30 +439,32 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: offset: Offset(
Offset(0, 3), // changes position of shadow 0, 3), // changes position of shadow
), ),
], ],
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0), padding:
child: Center(child: Texts('Ft')), const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts(TranslationBase.of(context).feet))),
), ),
), ),
), ),
], ],
), ),
SizedBox( SizedBox(
height: 5.0, height: 8.0,
), ),
Texts( Texts(
'Weight', TranslationBase.of(context).weight,
),
SizedBox(
height: 5.0,
), ),
Row(
children: [
Container( Container(
width: 340.0, margin:
height: 60.0, EdgeInsets.symmetric(horizontal: 4.0, vertical: 12.0),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
), ),
@ -500,7 +513,8 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
), ),
onTap: () { onTap: () {
setState(() { setState(() {
if (weight < 250) weight++; if (weight < 250)
weight++;
}); });
}, },
), ),
@ -541,32 +555,31 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
], ],
), ),
), ),
], Texts(TranslationBase.of(context).selectUnit),
),
Texts('Select Unit'),
SizedBox( SizedBox(
height: 5.0, height: 5.0,
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
GestureDetector( Expanded(
child: GestureDetector(
onTap: () { onTap: () {
setState(() { setState(() {
updateColorWeight(1); updateColorWeight(1);
}); });
}, },
child: Container( child: Container(
height: 55.0, padding: EdgeInsets.all(12),
width: 150.0, margin: EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration( decoration: BoxDecoration(
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: offset: Offset(
Offset(0, 3), // changes position of shadow 0, 3), // changes position of shadow
), ),
], ],
color: kgCard, color: kgCard,
@ -575,19 +588,21 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
vertical: 0.0, horizontal: 18.0), vertical: 0.0, horizontal: 18.0),
child: Center(child: Texts('KG')), child: Center(child: Texts(TranslationBase.of(context).kg)),
),
), ),
), ),
), ),
GestureDetector( Expanded(
child: GestureDetector(
onTap: () { onTap: () {
setState(() { setState(() {
updateColorWeight(2); updateColorWeight(2);
}); });
}, },
child: Container( child: Container(
height: 55.0, padding: EdgeInsets.all(12),
width: 150.0, margin: EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration( decoration: BoxDecoration(
color: lbCard, color: lbCard,
borderRadius: BorderRadius.circular(3.0), borderRadius: BorderRadius.circular(3.0),
@ -596,25 +611,26 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: offset: Offset(
Offset(0, 3), // changes position of shadow 0, 3), // changes position of shadow
), ),
], ],
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0), padding:
child: Center(child: Texts('LB')), const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts(TranslationBase.of(context).pound)),
),
), ),
), ),
), ),
], ],
), ),
SizedBox( SizedBox(
height: 5.0, height: 8.0,
), ),
Texts('Activity level'), Texts(TranslationBase.of(context).activityLevel),
Container( Container(
width: 300,
child: DropdownButton<String>( child: DropdownButton<String>(
value: dropdownValue, value: dropdownValue,
icon: Icon(Icons.arrow_downward), icon: Icon(Icons.arrow_downward),
@ -646,11 +662,15 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
SizedBox( SizedBox(
height: 25.0, height: 25.0,
), ),
],
),
),
),
),
Container( Container(
height: 100.0, margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0),
width: 350.0,
child: SecondaryButton( child: SecondaryButton(
label: 'CALCULATE', label: TranslationBase.of(context).calculate,
onTap: () { onTap: () {
setState(() { setState(() {
calculateCalories(); calculateCalories();
@ -670,9 +690,6 @@ class _CalorieCalculatorState extends State<CalorieCalculator> {
), ),
], ],
), ),
),
),
),
); );
} }
} }

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

@ -18,6 +18,7 @@ class _HealthConverterState extends State<HealthConverter> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).converters, appBarTitle: TranslationBase.of(context).converters,
body: Column( body: Column(
children: [ 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/calorie_calculator/calorie_calculator.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/carbs/carbs.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/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/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -37,7 +38,8 @@ class _HealthCalculatorsState extends State<HealthCalculators>
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'Health Calculators', isShowDecPage: false,
appBarTitle: TranslationBase.of(context).calculators,
body: Scaffold( body: Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
appBar: PreferredSize( appBar: PreferredSize(
@ -72,13 +74,13 @@ class _HealthCalculatorsState extends State<HealthCalculators>
Container( Container(
width: MediaQuery.of(context).size.width * 0.35, width: MediaQuery.of(context).size.width * 0.35,
child: Center( child: Center(
child: Texts('General Health'), child: Texts(TranslationBase.of(context).generalHealth),
), ),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.35, width: MediaQuery.of(context).size.width * 0.35,
child: Center( child: Center(
child: Texts("Women's Health"), child: Texts(TranslationBase.of(context).womanHealth),
), ),
), ),
], ],
@ -115,9 +117,9 @@ class _HealthCalculatorsState extends State<HealthCalculators>
); );
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'BMI', title: TranslationBase.of(context).bmi,
imagePath: 'bmi_health_calculator.png', imagePath: 'bmi_health_calculator.png',
subTitle: 'Calculators', subTitle: TranslationBase.of(context).calcHealth,
), ),
), ),
), ),
@ -133,9 +135,9 @@ class _HealthCalculatorsState extends State<HealthCalculators>
); );
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'Calories', title: TranslationBase.of(context).calories,
imagePath: 'calories-calculator.png', imagePath: 'calories-calculator.png',
subTitle: 'Calculators', subTitle: TranslationBase.of(context).calcHealth,
), ),
), ),
), ),
@ -155,9 +157,9 @@ class _HealthCalculatorsState extends State<HealthCalculators>
); );
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'BMR', title: TranslationBase.of(context).bmr,
imagePath: 'BMR_calculator.png', imagePath: 'BMR_calculator.png',
subTitle: 'Calculators', subTitle: TranslationBase.of(context).calcHealth,
), ),
), ),
), ),
@ -173,9 +175,9 @@ class _HealthCalculatorsState extends State<HealthCalculators>
); );
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'Ideal Body', title: TranslationBase.of(context).idealBody,
imagePath: 'body_weight.png', imagePath: 'body_weight.png',
subTitle: 'Weight', subTitle: TranslationBase.of(context).weight,
), ),
), ),
), ),
@ -195,9 +197,9 @@ class _HealthCalculatorsState extends State<HealthCalculators>
); );
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'Body', title: TranslationBase.of(context).bodyWord,
imagePath: 'body_fat.png', imagePath: 'body_fat.png',
subTitle: 'Fat', subTitle: TranslationBase.of(context).fat,
), ),
), ),
), ),
@ -213,9 +215,9 @@ class _HealthCalculatorsState extends State<HealthCalculators>
); );
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'Carbohydrate', title: TranslationBase.of(context).carbohydrate,
imagePath: 'carb_protein.png', imagePath: 'carb_protein.png',
subTitle: 'Protein Fat', subTitle: TranslationBase.of(context).proteinFat,
), ),
), ),
), ),
@ -243,9 +245,9 @@ class _HealthCalculatorsState extends State<HealthCalculators>
); );
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'Ovulation', title: TranslationBase.of(context).ovulation,
imagePath: 'ovulation_period_icon.png', imagePath: 'ovulation_period_icon.png',
subTitle: 'Period', subTitle: TranslationBase.of(context).period,
), ),
), ),
), ),
@ -261,9 +263,9 @@ class _HealthCalculatorsState extends State<HealthCalculators>
); );
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: 'Delivery', title: TranslationBase.of(context).delivery,
imagePath: 'delivery_date_icon.png', 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:flutter/material.dart';
import 'package:giffy_dialog/giffy_dialog.dart'; import 'package:giffy_dialog/giffy_dialog.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
//import '../../../core/model/my_balance/AdvanceModel.dart'; //import '../../../core/model/my_balance/AdvanceModel.dart';
import 'confirm_payment_page.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/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class ConfirmSMSDialog extends StatefulWidget { class ConfirmSMSDialog extends StatefulWidget {
final String phoneNumber; final String phoneNumber;
@ -112,7 +112,6 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
height: 40, height: 40,
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
child: Stack( child: Stack(
children: [ children: [
Center( Center(
child: Texts( child: Texts(
@ -121,7 +120,8 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
), ),
Positioned(child: Container( Positioned(
child: Container(
child: InkWell( child: InkWell(
onTap: () => Navigator.pop(context), onTap: () => Navigator.pop(context),
child: Container( child: Container(
@ -137,7 +137,6 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
right: projectViewModel.isArabic ? 0 : 2, right: projectViewModel.isArabic ? 0 : 2,
) )
], ],
), ),
), ),
Image.asset( Image.asset(
@ -335,14 +334,13 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
void submit(MyBalanceViewModel model) { void submit(MyBalanceViewModel model) {
if (verifyAccountForm.currentState.validate()) { if (verifyAccountForm.currentState.validate()) {
GifLoaderDialogUtils.showMyDialog(context);
final activationCode = final activationCode =
digit1.text + digit2.text + digit3.text + digit4.text; digit1.text + digit2.text + digit3.text + digit4.text;
model model
.checkActivationCodeForAdvancePayment(activationCode: activationCode) .checkActivationCodeForAdvancePayment(activationCode: activationCode)
.then((value) {})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) { .then((value) {
GifLoaderDialogUtils.hideDialog(context);
Navigator.pop(context, true); Navigator.pop(context, true);
}); });
} }

@ -61,6 +61,7 @@ class _BookConfirmState extends State<BookConfirm> {
toDoProvider = Provider.of<ToDoCountProviderModel>(context); toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).bookAppo, appBarTitle: TranslationBase.of(context).bookAppo,
isShowDecPage: false,
isShowAppBar: true, isShowAppBar: true,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
@ -461,6 +462,7 @@ class _BookConfirmState extends State<BookConfirm> {
dialog.showAlertDialog(context); dialog.showAlertDialog(context);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
print(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/pages/livecare/widgets/clinic_card.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.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:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class DentalComplaints extends StatefulWidget { class DentalComplaints extends StatefulWidget {
SearchInfo searchInfo; SearchInfo searchInfo;
@ -59,12 +59,14 @@ class _DentalComplaintsState extends State<DentalComplaints> {
} }
getChiefComplaintsList() { getChiefComplaintsList() {
GifLoaderDialogUtils.showMyDialog(context);
getLanguageID(); getLanguageID();
ClinicListService service = new ClinicListService(); ClinicListService service = new ClinicListService();
service service
.getChiefComplaintsList( .getChiefComplaintsList(
widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, context) widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
print(res['List_DentalChiefComplain']); print(res['List_DentalChiefComplain']);
setState(() { setState(() {
@ -75,8 +77,8 @@ class _DentalComplaintsState extends State<DentalComplaints> {
}); });
} else {} } else {}
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); 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_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.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/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class QRCode extends StatefulWidget { class QRCode extends StatefulWidget {
PatientShareResponse patientShareResponse; PatientShareResponse patientShareResponse;
@ -235,6 +235,7 @@ class _QRCodeState extends State<QRCode> {
okText: TranslationBase.of(context).confirm, okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps, cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () { okFunction: () {
GifLoaderDialogUtils.showMyDialog(context);
service service
.sendAppointmentQREmail( .sendAppointmentQREmail(
widget.authUser.emailAddress, widget.authUser.emailAddress,
@ -247,15 +248,14 @@ class _QRCodeState extends State<QRCode> {
widget.patientShareResponse.doctorSpeciality), widget.patientShareResponse.doctorSpeciality),
context) context)
.then((res) { .then((res) {
print(res); GifLoaderDialogUtils.hideDialog(context);
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
}).catchError((err) { }).catchError((err) {
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading",
backgroundColor: Colors.blue.withOpacity(0.6));
}, },
cancelFunction: () => {}); cancelFunction: () => {});
dialog.showAlertDialog(context); dialog.showAlertDialog(context);

@ -26,6 +26,7 @@ class _SearchResultsState extends State<SearchResults> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).bookAppo, appBarTitle: TranslationBase.of(context).bookAppo,
isShowDecPage: false,
isShowAppBar: true, isShowAppBar: true,
body: Container( body: Container(
margin: EdgeInsets.all(10.0), 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/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class SearchByClinic extends StatefulWidget { class SearchByClinic extends StatefulWidget {
final List clnicIds; final List clnicIds;
@ -213,6 +212,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
}); });
} }
// TODO Mosa_REMARk to come back later
getDoctorsList(BuildContext context) { getDoctorsList(BuildContext context) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
SearchInfo searchInfo = new SearchInfo(); 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/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import '../SearchResults.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/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
// ignore: must_be_immutable // ignore: must_be_immutable
class DentalComplaintCard extends StatefulWidget { class DentalComplaintCard extends StatefulWidget {
@ -70,11 +70,13 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
List(); List();
GifLoaderDialogUtils.showMyDialog(context);
ClinicListService service = new ClinicListService(); ClinicListService service = new ClinicListService();
service service
.getChiefComplaintDoctorList(widget.listDentalChiefComplain.iD, .getChiefComplaintDoctorList(widget.listDentalChiefComplain.iD,
widget.listDentalChiefComplain.projectID, context) widget.listDentalChiefComplain.projectID, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
print(res['List_DentalDoctorChiefComplaintMapping']); print(res['List_DentalDoctorChiefComplaintMapping']);
setState(() { setState(() {
@ -114,9 +116,9 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
Future navigateToSearchResults( Future navigateToSearchResults(

@ -6,7 +6,6 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import '../DoctorProfile.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/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:table_calendar/table_calendar.dart'; import 'package:table_calendar/table_calendar.dart';
class CovidTimeSlots extends StatefulWidget { class CovidTimeSlots extends StatefulWidget {
@ -113,7 +112,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "COVID-19 TEST", appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true, isShowAppBar: true,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
@ -147,8 +146,8 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 20.0, right: 20.0, top: 40.0), left: 20.0, right: 20.0, top: 20.0),
child: Text("COVID-19 TEST", child: Text(TranslationBase.of(context).covidTest,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -157,7 +156,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 20.0, right: 20.0, top: 10.0), left: 20.0, right: 20.0, top: 10.0),
child: Text("Drive-Thru", child: Text(TranslationBase.of(context).driveThru,
style: TextStyle( style: TextStyle(
color: Colors.white, fontSize: 24.0)), color: Colors.white, fontSize: 24.0)),
), ),
@ -179,8 +178,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text( child: Text(TranslationBase.of(context).selectAppo,
"Kindly select one of the available appointments from below: ",
style: style:
TextStyle(color: Colors.black, fontSize: 16.0)), TextStyle(color: Colors.black, fontSize: 16.0)),
), ),
@ -493,10 +491,8 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
print(res); print(res);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Appointment Booked Successfully"); AppToast.showSuccessToast(message: "Appointment Booked Successfully");
// Future.delayed(new Duration(milliseconds: 1800), () {
getPatientShare(context, res['AppointmentNo'], docObject.clinicID, getPatientShare(context, res['AppointmentNo'], docObject.clinicID,
docObject.projectID, docObject); docObject.projectID, docObject);
// });
} else { } else {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
appo = new AppoitmentAllHistoryResultList(); appo = new AppoitmentAllHistoryResultList();
@ -522,9 +518,9 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
} }
}).catchError((err) { }).catchError((err) {
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo, cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo,
@ -543,8 +539,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
} }
}).catchError((err) { }).catchError((err) {
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
getPatientShare(context, String appointmentNo, int clinicID, int projectID, getPatientShare(context, String appointmentNo, int clinicID, int projectID,
@ -553,16 +548,13 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
service service
.getPatientShare(appointmentNo, clinicID, projectID, context) .getPatientShare(appointmentNo, clinicID, projectID, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res); print(res);
widget.patientShareResponse = new PatientShareResponse.fromJson(res); widget.patientShareResponse = new PatientShareResponse.fromJson(res);
})
.catchError((err) {
print(err);
})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
navigateToPaymentAlert(); navigateToPaymentAlert();
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
}); });
} }
@ -576,12 +568,12 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
getCovidFreeSlots(BuildContext context, int projectID) { getCovidFreeSlots(BuildContext context, int projectID) {
CovidDriveThruService service = new CovidDriveThruService(); CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context);
service.getCovidFreeSlots(context, projectID).then((res) { service.getCovidFreeSlots(context, projectID).then((res) {
print(res['COVID19_FreeTimeSlots']); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
if (res['COVID19_FreeTimeSlots'].length != 0) { if (res['COVID19_FreeTimeSlots'].length != 0) {
freeSlotsResponse = res['COVID19_FreeTimeSlots']; freeSlotsResponse = res['COVID19_FreeTimeSlots'];
print(res['COVID19_FreeTimeSlots'].length);
_getJSONSlots().then((value) => { _getJSONSlots().then((value) => {
setState(() => { setState(() => {
widget.selectedClinicID = widget.selectedClinicID =
@ -599,7 +591,6 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
} }
}).catchError((err) { }).catchError((err) {
print(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/CovidPaymentInfoResponse.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/DriveThroughTestingCenterModel.dart'; import 'package:diplomaticquarterapp/models/CovidDriveThru/DriveThroughTestingCenterModel.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-details.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-details.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.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/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:maps_launcher/maps_launcher.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 { class CovidDrivethruLocation extends StatefulWidget {
@override @override
@ -23,6 +26,8 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
String projectName = ""; String projectName = "";
String projectID = ""; String projectID = "";
ProjectViewModel projectViewModel;
@override @override
void initState() { void initState() {
WidgetsBinding.instance WidgetsBinding.instance
@ -32,8 +37,9 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: "COVID-19 TEST", appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true, isShowAppBar: true,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
@ -41,8 +47,10 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Container( Container(
alignment: Alignment.centerLeft, alignment: projectViewModel.isArabic
child: Text("Get The Result During 8 Hours", ? Alignment.centerRight
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).resultHeader,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 22.0, fontSize: 22.0,
@ -50,14 +58,15 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text( child: Text(TranslationBase.of(context).covidInfo,
"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",
style: TextStyle(fontSize: 16.0, color: Colors.black)), style: TextStyle(fontSize: 16.0, color: Colors.black)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 20.0), margin: EdgeInsets.only(top: 20.0),
alignment: Alignment.centerLeft, alignment: projectViewModel.isArabic
child: Text("Select Location", ? Alignment.centerRight
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 18.0, fontSize: 18.0,
@ -79,7 +88,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
margin: EdgeInsets.only(top: 15.0), margin: EdgeInsets.only(top: 15.0),
child: DropdownButtonHideUnderline( child: DropdownButtonHideUnderline(
child: DropdownButton<String>( child: DropdownButton<String>(
hint: new Text("Select Address"), hint: new Text(TranslationBase.of(context).selectAddress),
value: projectDropdownValue, value: projectDropdownValue,
items: projectsList.map((item) { items: projectsList.map((item) {
return new DropdownMenuItem<String>( return new DropdownMenuItem<String>(
@ -98,8 +107,10 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
isLocationSelected isLocationSelected
? Container( ? Container(
margin: EdgeInsets.only(top: 15.0), margin: EdgeInsets.only(top: 15.0),
alignment: Alignment.centerLeft, alignment: projectViewModel.isArabic
child: Text("Selected Location", ? Alignment.centerRight
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 18.0, fontSize: 18.0,
@ -150,8 +161,8 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () { onPressed: () {
getDirections(); getDirections();
}, },
child: child: Text(TranslationBase.of(context).getDirections,
Text("GET DIRECTIONS", style: TextStyle(fontSize: 18.0)), style: TextStyle(fontSize: 18.0)),
), ),
), ),
), ),
@ -178,7 +189,8 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () { onPressed: () {
back(); 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: () { onPressed: () {
next(); next();
}, },
child: Text("NEXT", style: TextStyle(fontSize: 18.0)), child: Text(TranslationBase.of(context).next,
style: TextStyle(fontSize: 18.0)),
), ),
), ),
), ),
@ -258,23 +271,18 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
CovidPaymentInfoResponse covidPaymentInfoResponse = CovidPaymentInfoResponse covidPaymentInfoResponse =
new CovidPaymentInfoResponse(); new CovidPaymentInfoResponse();
GifLoaderDialogUtils.showMyDialog(context);
service service
.getCovidPaymentInformation(context, int.parse(projectID)) .getCovidPaymentInformation(context, int.parse(projectID))
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson( covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(
res['COVID19_PatientShare']); res['COVID19_PatientShare']);
print(covidPaymentInfoResponse.procedureNameField); print(covidPaymentInfoResponse.procedureNameField);
}); });
} else {}
})
.catchError((err) {
print(err);
})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
@ -282,11 +290,16 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
covidPaymentInfoResponse: covidPaymentInfoResponse, covidPaymentInfoResponse: covidPaymentInfoResponse,
projectID: int.parse(projectID), projectID: int.parse(projectID),
))); )));
} else {}
})
.catchError((err) {
print(err);
}); });
} }
getProjectsList(BuildContext context) { getProjectsList(BuildContext context) {
CovidDriveThruService service = new CovidDriveThruService(); CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context);
service.getCovidProjectsList(context).then((res) { service.getCovidProjectsList(context).then((res) {
print(res); print(res);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
@ -296,10 +309,11 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
projectsList.add(new DriveThroughTestingCenterModel.fromJson(v)); projectsList.add(new DriveThroughTestingCenterModel.fromJson(v));
}); });
}); });
GifLoaderDialogUtils.hideDialog(context);
} else {} } else {}
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
} }

@ -23,7 +23,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "COVID-19 TEST", appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true, isShowAppBar: true,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
@ -57,8 +57,8 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 20.0, right: 20.0, top: 40.0), left: 20.0, right: 20.0, top: 20.0),
child: Text("COVID-19 TEST", child: Text(TranslationBase.of(context).covidTest,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -67,7 +67,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 20.0, right: 20.0, top: 10.0), left: 20.0, right: 20.0, top: 10.0),
child: Text("Drive-Thru", child: Text(TranslationBase.of(context).driveThru,
style: TextStyle( style: TextStyle(
color: Colors.white, fontSize: 24.0)), color: Colors.white, fontSize: 24.0)),
), ),
@ -88,7 +88,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
alignment: Alignment.center, alignment: Alignment.center,
margin: margin:
EdgeInsets.only(left: 0.0, right: 20.0, top: 30.0), EdgeInsets.only(left: 0.0, right: 20.0, top: 30.0),
child: Text("Test Fees", child: Text(TranslationBase.of(context).testFee,
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
fontSize: 22.0, fontSize: 22.0,
@ -156,7 +156,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
Container( Container(
alignment: Alignment.center, alignment: Alignment.center,
margin: EdgeInsets.fromLTRB(20.0, 15.0, 20.0, 5.0), 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, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 16.0, fontSize: 16.0,
@ -197,7 +197,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
onPressed: () { onPressed: () {
cancel(); 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, disabledTextColor: Colors.white,
disabledColor: Colors.grey[500], disabledColor: Colors.grey[500],
onPressed: isAgree ? next : null, 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), color: Color(0xff20bc44),
), ),
height: 30.0, 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), transform: Matrix4.translationValues(0.0, -8.0, 0.0),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
@ -385,14 +387,17 @@ class _ToDoState extends State<ToDo> {
), ),
widget.appoList[index].isLiveCareAppointment widget.appoList[index].isLiveCareAppointment
? Container( ? Container(
child: Text(TranslationBase.of(context).videoAppo, child: Text(
TranslationBase.of(context).videoAppo,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12.0)), fontSize: 12.0)),
) )
: Container( : Container(
child: Text(TranslationBase.of(context).walkinAppo, child: Text(
TranslationBase.of(context)
.walkinAppo,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -825,20 +830,25 @@ class _ToDoState extends State<ToDo> {
res['Fort_id'], res['PaymentMethod'], context) res['Fort_id'], res['PaymentMethod'], context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']); print(res['OnlineCheckInAppointments'][0]);
addAdvancedNumberRequest( addAdvancedNumberRequest(
res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
paymentReference, paymentReference,
appo.appointmentNo.toString(), appo.appointmentNo.toString(),
appo); appo,
res['OnlineCheckInAppointments'][0]);
}).catchError((err) { }).catchError((err) {
print(err); print(err);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
}); });
} }
addAdvancedNumberRequest(String advanceNumber, String paymentReference, addAdvancedNumberRequest(
String appointmentID, AppoitmentAllHistoryResultList appo) { String advanceNumber,
String paymentReference,
String appointmentID,
AppoitmentAllHistoryResultList appo,
dynamic apptData) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
@ -846,7 +856,9 @@ class _ToDoState extends State<ToDo> {
advanceNumber, paymentReference, appointmentID, context) advanceNumber, paymentReference, appointmentID, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(res); if (appo.isLiveCareAppointment)
addVIDARequestInsert(advanceNumber, paymentReference, apptData);
else
getAppoQR(context, appo); getAppoQR(context, appo);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -854,6 +866,21 @@ class _ToDoState extends State<ToDo> {
}); });
} }
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);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
getPatientData() async { getPatientData() async {
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
if (await sharedPref.getObject(USER_PROFILE) != null) { if (await sharedPref.getObject(USER_PROFILE) != null) {

@ -473,7 +473,8 @@ class _HomePageState extends State<HomePage> {
height: 10, height: 10,
), ),
Texts( Texts(
TranslationBase.of(context).cmcHeading, TranslationBase.of(context)
.homeHealthCare,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
@ -545,8 +546,7 @@ class _HomePageState extends State<HomePage> {
height: 10, height: 10,
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context).cmcHeading,
.emergencyService,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w700, 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/clinic_list.dart';
import 'package:diplomaticquarterapp/pages/livecare/widgets/livecare_logs.dart'; import 'package:diplomaticquarterapp/pages/livecare/widgets/livecare_logs.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.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/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'livecare_type_select.dart';
class LiveCareHome extends StatefulWidget { class LiveCareHome extends StatefulWidget {
static bool showFooterButton = true; static bool showFooterButton = true;
@ -35,7 +33,9 @@ class _LiveCareHomeState extends State<LiveCareHome>
pendingERRequestHistoryList = new ErRequestHistoryList(); pendingERRequestHistoryList = new ErRequestHistoryList();
WidgetsBinding.instance.addPostFrameCallback((_) => getLiveCareHistory()); WidgetsBinding.instance.addPostFrameCallback((_) {
if (!isDataLoaded) getLiveCareHistory();
});
super.initState(); super.initState();
} }
@ -89,6 +89,7 @@ class _LiveCareHomeState extends State<LiveCareHome>
} }
void getLiveCareHistory() { void getLiveCareHistory() {
GifLoaderDialogUtils.showMyDialog(context);
setState(() { setState(() {
isDataLoaded = false; isDataLoaded = false;
hasLiveCareRequest = false; hasLiveCareRequest = false;
@ -96,9 +97,8 @@ class _LiveCareHomeState extends State<LiveCareHome>
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
PatientERVirtualHistoryResponse patientERVirtualHistoryResponse = PatientERVirtualHistoryResponse patientERVirtualHistoryResponse =
new PatientERVirtualHistoryResponse(); new PatientERVirtualHistoryResponse();
service service.getLivecareHistory(context).then((res) {
.getLivecareHistory(context) GifLoaderDialogUtils.hideDialog(context);
.then((res) {
setState(() { setState(() {
print(res['ErRequestHistoryList'].length); print(res['ErRequestHistoryList'].length);
if (res['ErRequestHistoryList'].length != 0) { if (res['ErRequestHistoryList'].length != 0) {
@ -117,17 +117,11 @@ class _LiveCareHomeState extends State<LiveCareHome>
hasLiveCareRequest = false; hasLiveCareRequest = false;
} }
} }
});
})
.catchError((err) {
print(err);
})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
setState(() {
isDataLoaded = true; isDataLoaded = true;
}); });
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
}); });
} }
} }

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

@ -51,20 +51,19 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
), ),
Container( Container(
alignment: Alignment.center, alignment: Alignment.center,
child: Text("LiveCare Service", child: Text(TranslationBase.of(context).livecareService,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontSize: 20.0))), fontWeight: FontWeight.bold, fontSize: 20.0))),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
"is to obtain medical advice with a specialist doctor Via a video call", TranslationBase.of(context).livecareServiceDesc,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontSize: 18.0))), style: TextStyle(fontSize: 18.0))),
Container( Container(
margin: EdgeInsets.only(top: 15.0), margin: EdgeInsets.only(top: 15.0),
alignment: Alignment.centerLeft, child: Text(TranslationBase.of(context).whyLivecare,
child: Text("WHY LIVECARE?",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontSize: 20.0))), fontWeight: FontWeight.bold, fontSize: 20.0))),
Container( Container(
@ -77,7 +76,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
width: MediaQuery.of(context).size.width * 0.72, width: MediaQuery.of(context).size.width * 0.72,
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text( child: Text(
"No need to wait, you will get Medical consultation immediately via Video call.", TranslationBase.of(context).livecarePoint1,
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle(fontSize: 14.0)), style: TextStyle(fontSize: 14.0)),
) )
@ -93,7 +92,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
Container( Container(
width: MediaQuery.of(context).size.width * 0.72, width: MediaQuery.of(context).size.width * 0.72,
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text("The doctor will see your medical file.", child: Text(TranslationBase.of(context).docVirtualAppoIns4,
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle(fontSize: 14.0)), style: TextStyle(fontSize: 14.0)),
) )
@ -109,7 +108,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
Container( Container(
width: MediaQuery.of(context).size.width * 0.72, width: MediaQuery.of(context).size.width * 0.72,
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text("Free Prescription delivery service.", child: Text(TranslationBase.of(context).docVirtualAppoIns5,
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle(fontSize: 14.0)), style: TextStyle(fontSize: 14.0)),
) )
@ -119,7 +118,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
Container( Container(
margin: EdgeInsets.only(top: 20.0), margin: EdgeInsets.only(top: 20.0),
child: Text( 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))), style: TextStyle(fontSize: 16.0))),
InkWell( InkWell(
onTap: (){ onTap: (){
@ -134,7 +133,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.only(left: 20.0), margin: EdgeInsets.only(left: 10.0, right: 10.0),
child: SvgPicture.asset( child: SvgPicture.asset(
"assets/images/new-design/liveCare_logo_icon_white.svg", "assets/images/new-design/liveCare_logo_icon_white.svg",
width: 80), width: 80),
@ -144,7 +143,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
margin: EdgeInsets.fromLTRB(30.0, 20.0, 0.0, 0.0), margin: EdgeInsets.fromLTRB(30.0, 20.0, 0.0, 0.0),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Text("Get Medical consultation immediately", Text(TranslationBase.of(context).livecareOption1,
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -152,8 +151,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
color: Colors.white)), color: Colors.white)),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.centerLeft, child: Text(TranslationBase.of(context).livecareOption2,
child: Text("Instant video call",
style: TextStyle( style: TextStyle(
fontSize: 18.0, color: Colors.white)), fontSize: 18.0, color: Colors.white)),
) )
@ -176,19 +174,18 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.only(left: 20.0), margin: EdgeInsets.only(left: 10.0, right: 10.0),
child: Image.asset( child: Image.asset(
"assets/images/new-design/calendar.png", "assets/images/new-design/calendar.png",
width: 70), width: 70),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.58, 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( child: Column(
children: <Widget>[ children: <Widget>[
Container( Container(
alignment: Alignment.centerLeft, child: Text(TranslationBase.of(context).livecareOption3,
child: Text("Book Appointment",
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -197,8 +194,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.centerLeft, child: Text(TranslationBase.of(context).livecareOption4,
child: Text("Schedule Video Call",
style: TextStyle( style: TextStyle(
fontSize: 18.0, color: Colors.white)), 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/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.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/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class LiveCareHistoryCard extends StatefulWidget { class LiveCareHistoryCard extends StatefulWidget {
ErRequestHistoryList erRequestHistoryList; ErRequestHistoryList erRequestHistoryList;
@ -178,6 +178,7 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
sendInvoiceEmail(context) { sendInvoiceEmail(context) {
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service service
.sendLiveCareInvoiceEmail( .sendLiveCareInvoiceEmail(
widget.erRequestHistoryList.appointmentNo.toString(), widget.erRequestHistoryList.appointmentNo.toString(),
@ -189,8 +190,7 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
}).catchError((err) { }).catchError((err) {
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
getAuthenticatedUser() async { getAuthenticatedUser() async {

@ -3,9 +3,9 @@ import 'package:diplomaticquarterapp/models/FamilyFiles/PatientERVirtualHistoryR
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.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/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class LiveCarePendingRequest extends StatefulWidget { class LiveCarePendingRequest extends StatefulWidget {
ErRequestHistoryList pendingERRequestHistoryList; ErRequestHistoryList pendingERRequestHistoryList;
@ -149,19 +149,17 @@ class _LiveCarePendingRequestState extends State<LiveCarePendingRequest> {
cancelLiveCareRequest() { cancelLiveCareRequest() {
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service service
.cancelLiveCareRequest(widget.pendingERRequestHistoryList.vCID, context) .cancelLiveCareRequest(widget.pendingERRequestHistoryList.vCID, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast( AppToast.showSuccessToast(
message: "LiveCare request cancelled successfully"); message: "LiveCare request cancelled successfully");
})
.catchError((err) {
print(err);
})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
widget.getLiveCareHistory(); 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/models/LiveCare/LiveCareClinicsListResponse.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'ClinicTimingsDialog.dart'; import 'ClinicTimingsDialog.dart';
@ -90,9 +90,11 @@ class _State extends State<ClinicCard> {
getClinicTimings(PatientERGetClinicsList patientERGetClinicsList) { getClinicTimings(PatientERGetClinicsList patientERGetClinicsList) {
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service service
.getLivecareClinicTiming(patientERGetClinicsList.serviceID, context) .getLivecareClinicTiming(patientERGetClinicsList.serviceID, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
clinicsServiceTimingsResponse = clinicsServiceTimingsResponse =
@ -129,8 +131,8 @@ class _State extends State<ClinicCard> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
} }

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

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

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

@ -122,7 +122,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
childAspectRatio: MediaQuery.of(context) childAspectRatio: MediaQuery.of(context)
.size .size
.width / .width /
(MediaQuery.of(context).size.height / 2.40), (MediaQuery.of(context).size.height / 2.20),
), ),
itemCount: myMedicalList.length, itemCount: myMedicalList.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {

@ -0,0 +1,99 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
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';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart';
class PrescriptionDeliveryAddressPage extends StatelessWidget {
final Prescriptions prescriptions;
const PrescriptionDeliveryAddressPage({Key key, this.prescriptions})
: super(key: key);
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowAppBar: true,
appBarTitle: 'Delivery Address',
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
height: 15,
),
InkWell(
onTap: () {},
child: Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
height: 50,
decoration: BoxDecoration(
border: Border.all(color: Colors.grey),
borderRadius: BorderRadius.circular(7),
color: Colors.white,
shape: BoxShape.rectangle,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
child: Texts(
'Selected Address',
variant: 'bodyText',
),
margin: EdgeInsets.only(left: 10, right: 10),
),
Icon(
Icons.arrow_drop_down,
size: 22,
color: Colors.grey,
)
],
),
),
),
SizedBox(
height: 15,
),
Container(
child: Image.asset(projectViewModel.isArabic
? 'assets/images/pharmacy/shipping_image_ar.png'
: 'assets/images/pharmacy/shipping_image.png',height: 300,),
)
],
),
),
bottomSheet: Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * 0.25,
color: Colors.grey[100],
child: Column(
children: <Widget>[
Divider(),
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
label: 'Add New Address'.toUpperCase(),
onTap: () {},
),
),
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
label: 'Continue'.toUpperCase(),
backgroundColor: Colors.green[200],
onTap: () {},
))
],
),
));
}
}

@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -14,12 +15,13 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../../widgets/dialogs/confirm_send_email_dialog.dart'; import '../../../widgets/dialogs/confirm_send_email_dialog.dart';
import 'PrescriptionIDeliveryAddressPage.dart';
class PrescriptionItemsPage extends StatelessWidget { class PrescriptionItemsPage extends StatelessWidget {
final Prescriptions prescriptions; final Prescriptions prescriptions;
PrescriptionItemsPage({Key key, this.prescriptions}); PrescriptionItemsPage({Key key, this.prescriptions});
//TODO
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
@ -181,7 +183,7 @@ class PrescriptionItemsPage extends StatelessWidget {
), ),
bottomSheet: Container( bottomSheet: Container(
width: double.infinity, width: double.infinity,
height: MediaQuery.of(context).size.height * 0.14, height: MediaQuery.of(context).size.height * 0.25,
color: Colors.grey[100], color: Colors.grey[100],
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
@ -197,12 +199,22 @@ class PrescriptionItemsPage extends StatelessWidget {
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
), ),
), ),
if (false)
Container( Container(
width: MediaQuery.of(context).size.width * 0.8, width: MediaQuery.of(context).size.width * 0.8,
child: Button( child: SecondaryButton(
label: TranslationBase.of(context).resendOrder, label: TranslationBase.of(context).resendOrder,
backgroundColor: Colors.green[200], color: Colors.green[200],
onTap: (){
var asd="";
Navigator.push(
context,
FadePage(
page: PrescriptionDeliveryAddressPage(
prescriptions: prescriptions,
),
),
);
},
)) ))
], ],
), ),

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

@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/models/Request.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
class DoctorsListService extends BaseService { class DoctorsListService extends BaseService {
@ -934,6 +935,64 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); 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 { Future<Map> isAllowedToAskDoctor(int docID, BuildContext context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -1109,14 +1168,16 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); 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; Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson( var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE)); await this.sharedPref.getObject(USER_PROFILE));
authUser = data; authUser = data;
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"AppointmentNo": appoNo, "AppointmentNo": appoNo,

@ -1401,6 +1401,48 @@ class TranslationBase {
localizedValues["bloodD-enter-desc"][locale.languageCode]; localizedValues["bloodD-enter-desc"][locale.languageCode];
String get viewTermsConditions => String get viewTermsConditions =>
localizedValues["viewTermsConditions"][locale.languageCode]; 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 walkinAppo => localizedValues["WalkinAppo"][locale.languageCode];
String get videoAppo => localizedValues["videoAppo"][locale.languageCode]; String get videoAppo => localizedValues["videoAppo"][locale.languageCode];
String get weightAdd => localizedValues["weight-add"][locale.languageCode]; String get weightAdd => localizedValues["weight-add"][locale.languageCode];
@ -1409,6 +1451,48 @@ class TranslationBase {
String get diastolicAdd => String get diastolicAdd =>
localizedValues["systolic-add"][locale.languageCode]; localizedValues["systolic-add"][locale.languageCode];
String get cmcHeading => localizedValues["cmc-heading"][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 today => localizedValues["today"][locale.languageCode];
String get week => localizedValues["week"][locale.languageCode]; String get week => localizedValues["week"][locale.languageCode];
@ -1442,7 +1526,7 @@ class TranslationBase {
String get l => localizedValues["l"][locale.languageCode]; String get l => localizedValues["l"][locale.languageCode];
String get customLabel => String get customLabel =>
localizedValues["custom-label"][locale.languageCode]; localizedValues["custom-label"][locale.languageCode];
String get selectUnit => localizedValues["select-unit"][locale.languageCode];
String get customLabelInLitres => String get customLabelInLitres =>
localizedValues["custom-label-in-litres"][locale.languageCode]; localizedValues["custom-label-in-litres"][locale.languageCode];
String get customLabelInMililitres => String get customLabelInMililitres =>

@ -206,9 +206,7 @@ class Utils {
); );
}, },
child: isLogin child: isLogin
? Container( ? Stack(children: [
height: 120,
child: Stack(children: [
MedicalProfileItem( MedicalProfileItem(
title: TranslationBase.of(context).myAppointments, title: TranslationBase.of(context).myAppointments,
imagePath: 'my_appointment_icon.png', imagePath: 'my_appointment_icon.png',
@ -231,8 +229,7 @@ class Utils {
), ),
), ),
), ),
]), ])
)
: MedicalProfileItem( : MedicalProfileItem(
title: TranslationBase.of(context).myAppointments, title: TranslationBase.of(context).myAppointments,
imagePath: 'my_appointment_icon.png', imagePath: 'my_appointment_icon.png',

@ -22,11 +22,13 @@ class MedicalProfileItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return RoundedContainer( return Container(
showBorder: true, height: 180,
borderWidth: 0, margin: EdgeInsets.all(5),
margin: 4, decoration: BoxDecoration(
child: Container( borderRadius: BorderRadius.circular(10),
color: Colors.white
),
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -47,7 +49,6 @@ class MedicalProfileItem extends StatelessWidget {
) )
], ],
), ),
),
); );
} }
} }

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

@ -1,55 +1,41 @@
import 'dart:collection'; import 'dart:collection';
import 'dart:convert'; import 'dart:math';
import 'package:diplomaticquarterapp/config/config.dart'; 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/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.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/DoctorProfile.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.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/BookAppointment/widgets/BranchView.dart';
import 'package:diplomaticquarterapp/pages/ErService/NearestEr.dart'; import 'package:diplomaticquarterapp/pages/ErService/NearestEr.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.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/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/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.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/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/patient_sick_leave_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_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/radiology/radiology_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/reports/report_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/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_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/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/services/robo_search/search_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.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/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:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_tts/flutter_tts.dart'; import 'package:flutter_tts/flutter_tts.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:speech_to_text/speech_recognition_error.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_recognition_result.dart';
import 'package:speech_to_text/speech_to_text.dart'; import 'package:speech_to_text/speech_to_text.dart';
import 'dart:math';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/routes.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 { class BottomBarSearch extends StatefulWidget {
@override @override
@ -78,6 +64,7 @@ class _SearchBot extends State<BottomBarSearch> {
bool _isInit = true; bool _isInit = true;
TextEditingController searchController = TextEditingController(); TextEditingController searchController = TextEditingController();
@override @override
void initState() { void initState() {
requestPermissions(); requestPermissions();
@ -434,10 +421,12 @@ class _SearchBot extends State<BottomBarSearch> {
List<String> arr = []; List<String> arr = [];
List<String> arrDistance = []; List<String> arrDistance = [];
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service service
.getDoctorsList(clinicId, projectId, false, context, .getDoctorsList(clinicId, projectId, false, context,
doctorId: doctorId, doctorName: doctorName) doctorId: doctorId, doctorName: doctorName)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
if (res['SearchDoctorsByTime_IsVoiceCommandList'] != null && if (res['SearchDoctorsByTime_IsVoiceCommandList'] != null &&
@ -485,9 +474,9 @@ class _SearchBot extends State<BottomBarSearch> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
Future navigateToDoctorProfile(context, docObject, docProfile, Future navigateToDoctorProfile(context, docObject, docProfile,

Loading…
Cancel
Save