diff --git a/assets/images/BMI/BMIChart_AR.png b/assets/images/BMI/BMIChart_AR.png new file mode 100644 index 00000000..405574c0 Binary files /dev/null and b/assets/images/BMI/BMIChart_AR.png differ diff --git a/assets/images/BMI/BMIChart_EN.png b/assets/images/BMI/BMIChart_EN.png new file mode 100644 index 00000000..2432e888 Binary files /dev/null and b/assets/images/BMI/BMIChart_EN.png differ diff --git a/assets/images/BMI/bmi_blue_female_ar.png b/assets/images/BMI/bmi_blue_female_ar.png new file mode 100644 index 00000000..483cb664 Binary files /dev/null and b/assets/images/BMI/bmi_blue_female_ar.png differ diff --git a/assets/images/BMI/bmi_blue_female_en.png b/assets/images/BMI/bmi_blue_female_en.png new file mode 100644 index 00000000..9984736e Binary files /dev/null and b/assets/images/BMI/bmi_blue_female_en.png differ diff --git a/assets/images/BMI/bmi_blue_male_ar.png b/assets/images/BMI/bmi_blue_male_ar.png new file mode 100644 index 00000000..d4ff734c Binary files /dev/null and b/assets/images/BMI/bmi_blue_male_ar.png differ diff --git a/assets/images/BMI/bmi_blue_male_en.png b/assets/images/BMI/bmi_blue_male_en.png new file mode 100644 index 00000000..ec50a0c6 Binary files /dev/null and b/assets/images/BMI/bmi_blue_male_en.png differ diff --git a/assets/images/BMI/bmi_green_female_ar.png b/assets/images/BMI/bmi_green_female_ar.png new file mode 100644 index 00000000..f8dc4759 Binary files /dev/null and b/assets/images/BMI/bmi_green_female_ar.png differ diff --git a/assets/images/BMI/bmi_green_female_en.png b/assets/images/BMI/bmi_green_female_en.png new file mode 100644 index 00000000..b4eb32e0 Binary files /dev/null and b/assets/images/BMI/bmi_green_female_en.png differ diff --git a/assets/images/BMI/bmi_green_male_ar.png b/assets/images/BMI/bmi_green_male_ar.png new file mode 100644 index 00000000..380d8384 Binary files /dev/null and b/assets/images/BMI/bmi_green_male_ar.png differ diff --git a/assets/images/BMI/bmi_green_male_en.png b/assets/images/BMI/bmi_green_male_en.png new file mode 100644 index 00000000..78693310 Binary files /dev/null and b/assets/images/BMI/bmi_green_male_en.png differ diff --git a/assets/images/BMI/bmi_orange_female_ar.png b/assets/images/BMI/bmi_orange_female_ar.png new file mode 100644 index 00000000..b2437c14 Binary files /dev/null and b/assets/images/BMI/bmi_orange_female_ar.png differ diff --git a/assets/images/BMI/bmi_orange_female_en.png b/assets/images/BMI/bmi_orange_female_en.png new file mode 100644 index 00000000..31779cd3 Binary files /dev/null and b/assets/images/BMI/bmi_orange_female_en.png differ diff --git a/assets/images/BMI/bmi_orange_male_ar.png b/assets/images/BMI/bmi_orange_male_ar.png new file mode 100644 index 00000000..291b316e Binary files /dev/null and b/assets/images/BMI/bmi_orange_male_ar.png differ diff --git a/assets/images/BMI/bmi_orange_male_en.png b/assets/images/BMI/bmi_orange_male_en.png new file mode 100644 index 00000000..c6ebb5eb Binary files /dev/null and b/assets/images/BMI/bmi_orange_male_en.png differ diff --git a/assets/images/BMI/bmi_red_female_ar.png b/assets/images/BMI/bmi_red_female_ar.png new file mode 100644 index 00000000..0e4d7339 Binary files /dev/null and b/assets/images/BMI/bmi_red_female_ar.png differ diff --git a/assets/images/BMI/bmi_red_female_en.png b/assets/images/BMI/bmi_red_female_en.png new file mode 100644 index 00000000..0d5dfe80 Binary files /dev/null and b/assets/images/BMI/bmi_red_female_en.png differ diff --git a/assets/images/BMI/bmi_red_male_ar.png b/assets/images/BMI/bmi_red_male_ar.png new file mode 100644 index 00000000..86a47cb2 Binary files /dev/null and b/assets/images/BMI/bmi_red_male_ar.png differ diff --git a/assets/images/BMI/bmi_red_male_en.png b/assets/images/BMI/bmi_red_male_en.png new file mode 100644 index 00000000..452aa4f3 Binary files /dev/null and b/assets/images/BMI/bmi_red_male_en.png differ diff --git a/assets/images/BMI/bmi_yellow_female_ar.png b/assets/images/BMI/bmi_yellow_female_ar.png new file mode 100644 index 00000000..7453a642 Binary files /dev/null and b/assets/images/BMI/bmi_yellow_female_ar.png differ diff --git a/assets/images/BMI/bmi_yellow_female_en.png b/assets/images/BMI/bmi_yellow_female_en.png new file mode 100644 index 00000000..d2374c22 Binary files /dev/null and b/assets/images/BMI/bmi_yellow_female_en.png differ diff --git a/assets/images/BMI/bmi_yellow_male_ar.png b/assets/images/BMI/bmi_yellow_male_ar.png new file mode 100644 index 00000000..754cf6ea Binary files /dev/null and b/assets/images/BMI/bmi_yellow_male_ar.png differ diff --git a/assets/images/BMI/bmi_yellow_male_en.png b/assets/images/BMI/bmi_yellow_male_en.png new file mode 100644 index 00000000..f64decfe Binary files /dev/null and b/assets/images/BMI/bmi_yellow_male_en.png differ diff --git a/assets/images/BMI/default.png b/assets/images/BMI/default.png new file mode 100644 index 00000000..cef9f7d7 Binary files /dev/null and b/assets/images/BMI/default.png differ diff --git a/lib/config/config.dart b/lib/config/config.dart index 6686a23c..03f09dfc 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -12,8 +12,8 @@ const EXA_CART_API_BASE_URL = 'https://mdlaboratories.com/exacartapi'; const PACKAGES_CATEGORIES = '/api/categories'; const PACKAGES_PRODUCTS = '/api/products'; -const BASE_URL = 'https://uat.hmgwebservices.com/'; -// const BASE_URL = 'https://hmgwebservices.com/'; +// const BASE_URL = 'https://uat.hmgwebservices.com/'; +const BASE_URL = 'https://hmgwebservices.com/'; //const BASE_PHARMACY_URL = 'http://swd-pharapp-01:7200/api/'; const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; @@ -400,7 +400,9 @@ const GET_PARENT_PRODUCTS = 'products?categoryid='; const GET_SUB_CATEGORISE = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id='; const GET_SUB_PRODUCTS = 'products?categoryid='; const GET_FINAL_PRODUCTS = - 'products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId='; + 'products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId=';const GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory'; +const GET_DISEASE_BY_CLINIC_ID = 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID'; +const SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime'; const TIMER_MIN = 10; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index c0aa888f..477516c8 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1142,10 +1142,55 @@ const Map localizedValues = { "en": "Enter the required information, In order to register for Blood Donation Service", "ar": "أدخل المعلومات المطلوبة ، للتسجيل في خدمة التبرع بالدم" }, - "viewTermsConditions": {"en": "To view the terms and conditions", "ar": "لعرض الشروط والأحكام"}, - "WalkinAppo": {"en": "Hospital Visit Appointment", "ar": "موعد زيارة للمستشفى"}, - "videoAppo": {"en": "Video Call Appointment", "ar": "موعد اتصال فيديو"}, - // "visit": {"en" : "Visit", "ar": "الزيارة"}, + "viewTermsConditions": { + "en": "To view the terms and conditions", + "ar": "لعرض الشروط والأحكام" + }, + "WalkinAppo": { + "en": "Hospital Visit Appointment", + "ar": "موعد زيارة للمستشفى" + }, + "videoAppo": { + "en": "Video Call Appointment", + "ar": "موعد اتصال فيديو" + }, + "generalHealth": {"en": "General Health", "ar": "صحة عامة"}, + "womanHealth": {"en": "Women's Health", "ar": "صحة المرأة"}, + "bmi": {"en": "BMI", "ar": "الكتلة"}, + "calc-health": {"en": "Calculators", "ar": "الصحية"}, + "calories": {"en": "Calories", "ar": "سعرات"}, + "bmr": {"en": "BMR", "ar": "معدل الأيض القاعدي"}, + "idealBody": {"en": "Ideal Body", "ar": "الجسم المثالي"}, + "body_word": {"en": "Body", "ar": "الجسم"}, + "fat": {"en": "Fat", "ar": "دهون"}, + "carbohydrate": {"en": "Carbohydrate", "ar": "كربوهيدرات"}, + "proteinFat": {"en": "Protein Fat", "ar": "دهون البروتين"}, + "ovulation": {"en": "Ovulation", "ar": "الإباضة"}, + "delivery": {"en": "Delivery", "ar": "الولادة"}, + "bmiCalcDesc": { + "en": + "'Calculate the BMI value and weight\n status to identify the healthy weight .\n Not appropriate for children and women\n who are pregnant or breastfeeding'", + "ar": + "حساب قيمة مؤشر كتلة الجسم وحالة الوزن لتحديد الوزن الصحي. \n وغير مناسب للأطفال والنساء الحوامل أو المرضعات" + }, + "selectUnit": {"en": "Select Unit", "ar": "اختر الوحدة"}, + "feet": {"en": "Feet", "ar": "قدم"}, + "pound": {"en": "Pound", "ar": "رطل"}, + "seeListOfDoctor": {"en": "See List Of Doctors", "ar": "انظر قائمة الأطباء"}, + "obese": {"en": "Obese", "ar": "سمين"}, + "overWeight": {"en": "OverWeight", "ar": "وزن زائد"}, + "healthy": {"en": "Healthy", "ar": "صحي"}, + "underWeight": {"en": "UnderWeight", "ar": "نقص الوزن"}, + "bmiCalcMsgObese": {"en" : "A BMI of over 30 indicates that are heavily overweight. Health may be at risk if not lose weight. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get started.", "ar": "يشير مؤشر كتلة الجسم الذي يزيد عن 30 إلى زيادة الوزن بشكل كبير. قد تكون الصحة في خطر إذا لم تفقد الوزن. يوصى بالتحدث إلى الطبيب أو أخصائي التغذية للحصول على المشورة. لحجز موعد ، انقر أدناه للبدء."}, + "bmiCalcMsgOverweight": {"en" : 'A BMI of 25 - 30 indicates that are slightly overweight. May be advised to lose some weight for health reasons. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get ', "ar": "يشير مؤشر كتلة الجسم من 25 إلى 30 إلى زيادة الوزن قليلاً. قد ينصح بفقدان بعض الوزن لأسباب صحية. يوصى بالتحدث إلى الطبيب أو أخصائي التغذية للحصول على المشورة. لحجز موعد ، انقر أدناه للحصول على"}, + "bmiCalcMsgHealthy": {"en" : "A BMI of 18.5 - 25 indicates that are at a healthy weight for the height. By maintaining a healthy weight, lower the risk of developing severe health problems. To book an appointment, click below to get started.", "ar": "يشير مؤشر كتلة الجسم من 18.5 - 25 إلى وزن صحي بالنسبة للطول. بالحفاظ على وزن صحي ، قلل من خطر الإصابة بمشاكل صحية خطيرة. لحجز موعد ، انقر أدناه للبدء."}, + "bmiCalcMsgUnderWeight": {"en" : "A BMI of less than 18.5 indicates that are underweight, so may need to put on some weight. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get started.", "ar": "يشير مؤشر كتلة الجسم الذي يقل عن 18.5 إلى أنك تعاني من نقص الوزن ، لذلك قد تحتاج إلى زيادة الوزن. يوصى بالتحدث إلى الطبيب أو أخصائي التغذية للحصول على المشورة. لحجز موعد ، انقر أدناه للبدء."}, + "bariatrics": {"en" : "Bariatrics", "ar": "طب السمنة"}, + "bariatricsHeaderMsg": {"en" : "Choose one of the following symptoms to show the right doctors or choose a consultation to show all", "ar": "اختر أحد الأعراض التالية لتظهر للأطباء المناسبين أو اختر استشارة لإظهار الكل"}, + "continue": {"en" : "CONTINUE", "ar": "إستمرار"}, + "skip": {"en" : "SKIP", "ar": "تخطى"}, + "calorieCalcDesc": {"en" : "Calculates daily calorie intake based on several factors, like height, weight, age, gender and daily physical activity ", "ar": "يحسب السعرات الحرارية اليومية بناءً على عدة عوامل ، مثل الطول والوزن والعمر والجنس والنشاط البدني اليومي"}, + "age11_120_years": {"en" : "The Age ( 11 - 120 ) yrs", "ar": "العمر (11 - 120) سنة"}, "weight-add": {"en": "Enter Weight Value", "ar": "أدخل الوزن "}, "systolic-add": {"en": "Enter Systolic Value", "ar": "أدخل قيمة الإنقباض "}, "diastolic-add": {"en": "Enter Diastolic Value", "ar": "أدخل قيمة الإنبساط "}, @@ -1284,4 +1329,5 @@ const Map localizedValues = { "areyousure": {"en": "Are you sure you want to Add", "ar": "هل أنت متأكد أنك تريد إضافة"}, "preferredunit": {"en": "Select the preferred unit", "ar": "اختر الوحدة المفضلة"}, "select-unit": {"en": "Select unit", "ar": "اختر وحدة القياس"} + // "visit": {"en" : "Visit", "ar": "الزيارة"}, }; diff --git a/lib/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart b/lib/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart new file mode 100644 index 00000000..ff1f0eb0 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart @@ -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 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 toJson() { + final Map data = new Map(); + 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; + } +} diff --git a/lib/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart b/lib/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart new file mode 100644 index 00000000..e92fa8da --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart @@ -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 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 toJson() { + final Map data = new Map(); + 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; + } +} \ No newline at end of file diff --git a/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart b/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart new file mode 100644 index 00000000..d0e41321 --- /dev/null +++ b/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart @@ -0,0 +1,76 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'file:///C:/Users/admin/AndroidStudioProjects/diplomatic-quarter/lib/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; + +class BariatricsService extends BaseService { + List clinicCategoryList = []; + List diseasesList = []; + + Future getClinicCategory() async { + hasError = false; + Map 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 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 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); + } +} diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index a11f9169..b244cc16 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -46,7 +46,8 @@ class BaseAppClient { //Map profile = await sharedPref.getObj(DOCTOR_PROFILE); if (!isExternal) { String token = await sharedPref.getString(TOKEN); - var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE,'ar'); + var languageID = + await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var user = await sharedPref.getObject(USER_PROFILE); if (body.containsKey('SetupID')) { body['SetupID'] = body.containsKey('SetupID') @@ -58,7 +59,7 @@ class BaseAppClient { body['VersionID'] = VERSION_ID; body['Channel'] = CHANNEL; - body['LanguageID'] = languageID == 'ar' ? 1 : 2; + body['LanguageID'] = languageID == 'ar' ? 1 : 2; body['IPAdress'] = IP_ADDRESS; body['generalid'] = GENERAL_ID; @@ -152,14 +153,26 @@ class BaseAppClient { } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) { onSuccess(parsed, statusCode); - } - else if(parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']){ - onFailure( - parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], - statusCode); - } - else if (!parsed['IsAuthenticated']) { - await logout(); + } else if (parsed['MessageStatus'] == 2 && + parsed['IsAuthenticated']) { + if (parsed['message'] == null && + parsed['ErrorEndUserMessage'] == null) { + if(parsed['ErrorSearchMsg'] == null ){ + onFailure("Server Error found with no available message", + statusCode); + }else { + onFailure(parsed['ErrorSearchMsg'], + statusCode); + } + } else { + onFailure( + parsed['message'] ?? + parsed['ErrorEndUserMessage'] ?? + parsed['ErrorMessage'], + statusCode); + } + } else if (!parsed['IsAuthenticated']) { + await logout(); //helpers.showErrorToast('Your session expired Please login agian'); } else { @@ -185,6 +198,7 @@ class BaseAppClient { onFailure(e.toString(), -1); } } + Future navigateToAppUpdate(context, String text) async { Navigator.pushReplacement( context, @@ -194,9 +208,9 @@ class BaseAppClient { get(String endPoint, {Function(dynamic response, int statusCode) onSuccess, - Function(String error, int statusCode) onFailure, - Map queryParams, - bool isExternal = false}) async { + Function(String error, int statusCode) onFailure, + Map queryParams, + bool isExternal = false}) async { String url; if (isExternal) { url = endPoint; @@ -234,9 +248,9 @@ class BaseAppClient { getPharmacy(String endPoint, {Function(dynamic response, int statusCode) onSuccess, - Function(String error, int statusCode) onFailure, - bool isAllowAny = false, - bool isExternal = false, + Function(String error, int statusCode) onFailure, + bool isAllowAny = false, + bool isExternal = false, Map queryParams}) async { String url; @@ -286,7 +300,10 @@ class BaseAppClient { } } - simpleGet(String fullUrl, {Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, Map queryParams}) async { + simpleGet(String fullUrl, + {Function(dynamic response, int statusCode) onSuccess, + Function(String error, int statusCode) onFailure, + Map queryParams}) async { String url = fullUrl; var haveParams = (queryParams != null); if (haveParams) { @@ -298,7 +315,10 @@ class BaseAppClient { if (await Utils.checkConnection()) { final response = await http.get( url.trim(), - headers: {'Content-Type': 'application/json', 'Accept': 'application/json'}, + headers: { + 'Content-Type': 'application/json', + 'Accept': 'application/json' + }, ); final int statusCode = response.statusCode; @@ -320,7 +340,8 @@ class BaseAppClient { await authenticatedUserObject.getUser(); Provider.of(AppGlobal.context, listen: false).isLogin = false; - var model = Provider.of(AppGlobal.context,listen: false); + var model = + Provider.of(AppGlobal.context, listen: false); _vitalSignService.weightKg = ""; _vitalSignService.heightCm = ""; model.setState(0, false); @@ -329,12 +350,13 @@ class BaseAppClient { String getSessionId(String id) { ///return id.replaceAll(RegExp('/[^\w\s]/'), ''); - return id.replaceAll(RegExp('/[^a-zA-Z ]'), ''); + return id.replaceAll(RegExp('/[^a-zA-Z ]'), ''); } static defaultHttpParameters() async { String token = await sharedPref.getString(TOKEN); - var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + var languageID = + await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var user = await sharedPref.getObject(USER_PROFILE); var params = {}; if (user != null) { @@ -352,4 +374,4 @@ class BaseAppClient { return params; } -} \ No newline at end of file +} diff --git a/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart b/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart new file mode 100644 index 00000000..551245d4 --- /dev/null +++ b/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart @@ -0,0 +1,48 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart'; +import 'file:///C:/Users/admin/AndroidStudioProjects/diplomatic-quarter/lib/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; + +import '../../../../locator.dart'; + +class BariatricsViewModel extends BaseViewModel { + BariatricsService _service = locator(); + + List get clinicCategoryList => _service.clinicCategoryList; + + List 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); + } + } +} diff --git a/lib/locator.dart b/lib/locator.dart index c5bde524..0dfca5af 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -18,6 +18,7 @@ import 'package:get_it/get_it.dart'; import 'core/service/AlHabibMedicalService/cmc_service.dart'; import 'core/service/AlHabibMedicalService/customer_addresses_service.dart'; import 'core/service/AlHabibMedicalService/e_referral_service.dart'; +import 'core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart'; import 'core/service/AlHabibMedicalService/home_health_care_service.dart'; import 'core/service/AuthenticatedUserObject.dart'; import 'core/service/appointment_rate_service.dart'; @@ -67,6 +68,7 @@ import 'core/service/parmacyModule/parmacy_module_service.dart'; import 'core/service/offers_service.dart'; import 'core/service/pharmacy_categorise_service.dart'; +import 'core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart'; import 'core/viewModels/TermsConditionsViewModel.dart'; import 'core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; import 'core/viewModels/appointment_rate_view_model.dart'; @@ -210,6 +212,7 @@ void setupLocator() { locator.registerLazySingleton(() => PrivilegeService()); locator.registerLazySingleton(() => WeatherService()); locator.registerLazySingleton(() => TermsConditionsService()); + locator.registerLazySingleton(() => BariatricsService()); /// View Model locator.registerFactory(() => HospitalViewModel()); @@ -273,6 +276,7 @@ void setupLocator() { //pharmacy locator.registerFactory(() => PharmacyCategoriseViewModel()); locator.registerFactory(() => OffersCategoriseViewModel()); + locator.registerFactory(() => BariatricsViewModel()); // Offer And Packages //---------------------- diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart new file mode 100644 index 00000000..d9665aa4 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart @@ -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 { + DiseasesByClinic _selectedDisease; + + @override + Widget build(BuildContext context) { + ProjectViewModel projectProvider = Provider.of(context); + + return BaseView( + 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; + } +} diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart index 68cd2c99..2dbf2035 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; @@ -27,6 +28,7 @@ class _BMICalculatorState extends State { Color ftCard = inactiveCardColor; Color lbCard = inactiveCardColor; Color kgCard = activeCardColor; + void updateColor(int type) { //MG/DLT card if (type == 1) { @@ -84,31 +86,27 @@ class _BMICalculatorState extends State { return bmiResult; } - void showTextResult() { + void showTextResult(BuildContext context) { if (bmiResult >= 30) { - textResult = 'Obese'; + textResult = TranslationBase.of(context).obese; } else if (bmiResult < 30 && bmiResult >= 25) { - textResult = 'OverWeight'; + textResult = TranslationBase.of(context).overWeight; } else if (bmiResult < 25 && bmiResult >= 18.5) { - textResult = 'Healthy'; + textResult = TranslationBase.of(context).healthy; } else if (bmiResult < 18.5) { - textResult = 'UnderWeight'; + textResult = TranslationBase.of(context).underWeight; } } - void showMsg() { + void showMsg(BuildContext context) { if (bmiResult >= 30) { - msg = - 'A BMI of over 30 indicates that are heavily overweight. Health may be at risk if not lose weight. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get started.'; + msg = TranslationBase.of(context).bmiCalcMsgObese; } else if (bmiResult < 30 && bmiResult >= 25) { - msg = - 'A BMI of 25 - 30 indicates that are slightly overweight. May be advised to lose some weight for health reasons. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get '; + msg = TranslationBase.of(context).bmiCalcMsgOverweight; } else if (bmiResult < 25 && bmiResult >= 18.5) { - msg = - 'A BMI of 18.5 - 25 indicates that are at a healthy weight for the height. By maintaining a healthy weight, lower the risk of developing severe health problems. To book an appointment, click below to get started.'; + msg = TranslationBase.of(context).bmiCalcMsgHealthy; } else if (bmiResult < 18.5) { - msg = - 'A BMI of less than 18.5 indicates that are underweight, so may need to put on some weight. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get started.'; + msg = TranslationBase.of(context).bmiCalcMsgUnderWeight; } } @@ -121,26 +119,28 @@ class _BMICalculatorState extends State { Widget build(BuildContext context) { return AppScaffold( isShowAppBar: true, - appBarTitle: 'BMI Calculator', + isShowDecPage: false, + appBarTitle: + "${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}", body: SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ Center( child: Container( - width: 350.0, + margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16), child: Padding( padding: EdgeInsets.symmetric(vertical: 15.0), child: Text( - 'Calculate the BMI value and weight\n status to identify the healthy weight .\n Not appropriate for children and women\n who are pregnant or breastfeeding', + TranslationBase.of(context).bmiCalcDesc, style: TextStyle(fontSize: 18.0), ), ), ), ), Container( - height: 200.0, - width: 350.0, + margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16), + padding: EdgeInsets.only(bottom: 16), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(12.0), @@ -151,7 +151,7 @@ class _BMICalculatorState extends State { children: [ Padding( padding: EdgeInsets.all(8.0), - child: Texts('Height'), + child: Texts(TranslationBase.of(context).height), ), ], ), @@ -241,7 +241,7 @@ class _BMICalculatorState extends State { children: [ Padding( padding: EdgeInsets.all(8.0), - child: Texts('Select Unit'), + child: Texts(TranslationBase.of(context).selectUnit), ), ], ), @@ -273,7 +273,8 @@ class _BMICalculatorState extends State { child: Padding( padding: const EdgeInsets.symmetric( vertical: 0.0, horizontal: 18.0), - child: Center(child: Texts('CM')), + child: Center( + child: Texts(TranslationBase.of(context).cm)), ), ), ), @@ -302,7 +303,8 @@ class _BMICalculatorState extends State { child: Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: Center(child: Texts('FT')), + child: Center( + child: Texts(TranslationBase.of(context).feet)), ), ), ), @@ -315,8 +317,8 @@ class _BMICalculatorState extends State { height: 25.0, ), Container( - height: 200.0, - width: 350.0, + margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16), + padding: EdgeInsets.only(bottom: 16), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(12.0), @@ -327,7 +329,7 @@ class _BMICalculatorState extends State { children: [ Padding( padding: EdgeInsets.all(8.0), - child: Texts('Weight'), + child: Texts(TranslationBase.of(context).weight), ), ], ), @@ -417,7 +419,7 @@ class _BMICalculatorState extends State { children: [ Padding( padding: EdgeInsets.all(8.0), - child: Texts('Select Unit'), + child: Texts(TranslationBase.of(context).selectUnit), ), ], ), @@ -449,7 +451,8 @@ class _BMICalculatorState extends State { child: Padding( padding: const EdgeInsets.symmetric( vertical: 0.0, horizontal: 18.0), - child: Center(child: Texts('KG')), + child: Center( + child: Texts(TranslationBase.of(context).kg)), ), ), ), @@ -478,7 +481,9 @@ class _BMICalculatorState extends State { child: Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: Center(child: Texts('LB')), + child: Center( + child: + Texts(TranslationBase.of(context).pound)), ), ), ), @@ -491,15 +496,15 @@ class _BMICalculatorState extends State { height: 25.0, ), Container( - height: 50.0, - width: 350.0, + margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16), + padding: EdgeInsets.symmetric(vertical: 8), child: SecondaryButton( - label: 'CALCULATE', + label: TranslationBase.of(context).calculate, onTap: () => { setState(() { calculateBMI(); - showTextResult(); - showMsg(); + showTextResult(context); + showMsg(context); { Navigator.push( context, diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart index bfbd10b7..8ac6b06c 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart @@ -1,5 +1,9 @@ import 'dart:ffi'; +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -12,6 +16,7 @@ class ResultPage extends StatelessWidget { final String msg; ResultPage({this.finalResult, this.textResult, this.msg}); + Color inductorColor; double percent; @@ -45,53 +50,74 @@ class ResultPage extends StatelessWidget { Widget build(BuildContext context) { return AppScaffold( isShowAppBar: true, - appBarTitle: "BMI Calculator", + appBarTitle: + "${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}", body: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - SizedBox( - // height: 40.0, - ), - Center( - child: CircularPercentIndicator( - radius: 220.0, - lineWidth: 20.0, - percent: percentInductor(), - center: Column( - mainAxisAlignment: MainAxisAlignment.center, + Expanded( + child: SingleChildScrollView( + child: Column( children: [ - Text( - finalResult.toStringAsFixed(1), - style: TextStyle( - fontSize: 18.0, - fontWeight: FontWeight.bold, + Container( + margin: EdgeInsets.only(top: 50), + child: Center( + child: CircularPercentIndicator( + radius: 220.0, + lineWidth: 20.0, + percent: percentInductor(), + center: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + finalResult.toStringAsFixed(1), + style: TextStyle( + fontSize: 18.0, + fontWeight: FontWeight.bold, + ), + ), + SizedBox( + height: 5.0, + ), + Text( + textResult, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + progressColor: colorInductor(), + backgroundColor: Colors.white, + ), ), ), - SizedBox( - height: 5.0, - ), - Text( - textResult, - style: TextStyle( - fontSize: 16.0, - fontWeight: FontWeight.w600, - ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + child: Texts(msg), ), ], ), - progressColor: colorInductor(), - backgroundColor: Colors.white, ), ), Container( - height: 120, - width: 280.0, - child: Texts(msg), - ), - Container( - width: 350, - child: Button( - label: 'See List Of Doctors', + margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + child: BorderedButton( + TranslationBase.of(context).seeListOfDoctor, + fontSize: SizeConfig.textMultiplier * 2.1, + textColor: Colors.white, + vPadding: 8, + hPadding: 8, + backgroundColor: Theme.of(context).primaryColor, + radius: 8, + fontWeight: FontWeight.bold, + handler: (){ + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => BariatricsPage(1, 1, finalResult)), + ); + }, ), ), ], diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_calculator.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_calculator.dart index 01393e0b..b393600f 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_calculator.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_calculator.dart @@ -122,6 +122,7 @@ class _BmrCalculatorState extends State { Widget build(BuildContext context) { return AppScaffold( isShowAppBar: true, + isShowDecPage: false, appBarTitle: 'Bmr Calculator', body: Padding( padding: EdgeInsets.symmetric(horizontal: 25.0, vertical: 15.0), diff --git a/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart b/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart index e2196540..d4e9c427 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; @@ -29,6 +30,7 @@ class _CalorieCalculatorState extends State { int weight = 0; double calories; String dropdownValue; + void updateColor(int type) { //MG/DLT card if (type == 1) { @@ -102,89 +104,91 @@ class _CalorieCalculatorState extends State { Widget build(BuildContext context) { return AppScaffold( isShowAppBar: true, - appBarTitle: 'Calorie Calculator', - body: Padding( - padding: const EdgeInsets.symmetric(horizontal: 25.0, vertical: 15.0), - child: SingleChildScrollView( - child: Container( - height: 890.0, - child: Column( - //mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.all(10.0), - child: Texts( - 'Calculates daily calorie intake based on several factors, like height, weight, age, gender and daily physical activity rate', - ), - ), - Padding( - padding: - EdgeInsets.symmetric(horizontal: 10.0, vertical: 15.0), - child: Texts('Gender'), - ), - Container( - width: 350, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(35.0), - color: Colors.white, - border: Border.all( - color: Colors.black45, - )), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - GestureDetector( - onTap: () { - setState(() { - updateColor(1); - isMale = false; - }); - }, - child: Container( - height: 55.0, - width: 170.0, - decoration: BoxDecoration( - color: maleCard, - borderRadius: BorderRadius.circular(35.0), + isShowDecPage: false, + appBarTitle: + "${TranslationBase.of(context).calories} ${TranslationBase.of(context).calcHealth}", + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Container( + margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0), + child: Column( + //mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).calorieCalcDesc, + ), + SizedBox( + height: 8.0, + ), + Texts(TranslationBase.of(context).gender), + SizedBox( + height: 8.0, + ), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(30.0), + color: Colors.white, + border: Border.all( + color: Colors.black45, + )), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColor(1); + isMale = false; + }); + }, + child: Container( + padding: EdgeInsets.symmetric(vertical: 16), + decoration: BoxDecoration( + color: maleCard, + borderRadius: BorderRadius.circular(30.0), + ), + child: Center( + child: Texts( + TranslationBase.of(context).female)), + ), + ), ), - child: Center(child: Texts('FEMALE')), - ), - ), - GestureDetector( - onTap: () { - setState(() { - updateColor(2); - isMale = true; - }); - }, - child: Container( - height: 55.0, - width: 170.0, - decoration: BoxDecoration( - color: femaleCard, - borderRadius: BorderRadius.circular(35.0), + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColor(2); + isMale = true; + }); + }, + child: Container( + padding: EdgeInsets.symmetric(vertical: 16), + decoration: BoxDecoration( + color: femaleCard, + borderRadius: BorderRadius.circular(30.0), + ), + child: Center( + child: Texts( + TranslationBase.of(context).male)), + ), + ), ), - child: Center(child: Texts('MALE')), - ), + ], ), - ], - ), - ), - SizedBox( - height: 15.0, - ), - Texts( - 'The Age ( 11 - 120 ) yrs', - ), - SizedBox( - height: 10.0, - ), - Row( - children: [ + ), + SizedBox( + height: 12.0, + ), + Texts( + TranslationBase.of(context).age11_120Years, + ), Container( - width: 340.0, - height: 60.0, + margin: + EdgeInsets.symmetric(horizontal: 4.0, vertical: 12.0), decoration: BoxDecoration( color: Colors.white, ), @@ -195,7 +199,7 @@ class _CalorieCalculatorState extends State { vertical: 10.0, horizontal: 8.0), child: Center( child: Container( - width: 60.0, + width: 60, foregroundDecoration: BoxDecoration( borderRadius: BorderRadius.circular(5.0), border: Border.all( @@ -206,12 +210,16 @@ class _CalorieCalculatorState extends State { child: Row( children: [ Expanded( - child: Center( - child: Text(age.toString()), + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Center( + child: Text(age.toString()), + ), ), ), Container( - height: 38.0, + padding: + EdgeInsets.symmetric(horizontal: 4), child: Column( crossAxisAlignment: CrossAxisAlignment.center, @@ -274,16 +282,12 @@ class _CalorieCalculatorState extends State { ], ), ), - ], - ), - Texts( - 'Height', - ), - Row( - children: [ + Texts( + TranslationBase.of(context).height, + ), Container( - width: 340.0, - height: 60.0, + margin: + EdgeInsets.symmetric(horizontal: 4.0, vertical: 12.0), decoration: BoxDecoration( color: Colors.white, ), @@ -305,12 +309,16 @@ class _CalorieCalculatorState extends State { child: Row( children: [ Expanded( - child: Center( - child: Text(height.toString()), + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Center( + child: Text(height.toString()), + ), ), ), Container( - height: 38.0, + padding: + EdgeInsets.symmetric(horizontal: 4.0), child: Column( crossAxisAlignment: CrossAxisAlignment.center, @@ -373,85 +381,90 @@ class _CalorieCalculatorState extends State { ], ), ), - ], - ), - Texts('Select Unit'), - SizedBox( - height: 5.0, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - GestureDetector( - onTap: () { - setState(() { - updateColorHeight(1); - }); - }, - child: Container( - height: 55.0, - width: 150.0, - decoration: BoxDecoration( - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.5), - spreadRadius: 3, - blurRadius: 7, - offset: - Offset(0, 3), // changes position of shadow - ), - ], - color: cmCard, - borderRadius: BorderRadius.circular(3.0), - ), - child: Padding( - padding: const EdgeInsets.symmetric( - vertical: 0.0, horizontal: 18.0), - child: Center(child: Texts('CM')), - ), - ), + Texts( + TranslationBase.of(context).selectUnit, + ), + SizedBox( + height: 8.0, ), - GestureDetector( - onTap: () { - setState(() { - updateColorHeight(2); - }); - }, - child: Container( - height: 55.0, - width: 150.0, - decoration: BoxDecoration( - color: ftCard, - borderRadius: BorderRadius.circular(3.0), - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.5), - spreadRadius: 3, - blurRadius: 7, - offset: - Offset(0, 3), // changes position of shadow + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColorHeight(1); + }); + }, + child: Container( + padding: EdgeInsets.all(12), + margin: EdgeInsets.symmetric(horizontal: 8), + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.5), + spreadRadius: 3, + blurRadius: 7, + offset: Offset( + 0, 3), // changes position of shadow + ), + ], + color: cmCard, + borderRadius: BorderRadius.circular(3.0), + ), + child: Padding( + padding: const EdgeInsets.symmetric( + vertical: 0.0, horizontal: 18.0), + child: Center(child: Texts(TranslationBase.of(context).cm)), + ), ), - ], + ), ), - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: Center(child: Texts('Ft')), + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColorHeight(2); + }); + }, + child: Container( + padding: EdgeInsets.all(12), + margin: EdgeInsets.symmetric(horizontal: 8), + decoration: BoxDecoration( + color: ftCard, + borderRadius: BorderRadius.circular(3.0), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.5), + spreadRadius: 3, + blurRadius: 7, + offset: Offset( + 0, 3), // changes position of shadow + ), + ], + ), + child: Padding( + padding: + const EdgeInsets.symmetric(horizontal: 16.0), + child: Center(child: Texts(TranslationBase.of(context).feet))), + ), + ), ), - ), + ], + ), + SizedBox( + height: 8.0, + ), + Texts( + TranslationBase.of(context).weight, + ), + SizedBox( + height: 5.0, ), - ], - ), - SizedBox( - height: 5.0, - ), - Texts( - 'Weight', - ), - Row( - children: [ Container( - width: 340.0, - height: 60.0, + margin: + EdgeInsets.symmetric(horizontal: 4.0, vertical: 12.0), decoration: BoxDecoration( color: Colors.white, ), @@ -500,7 +513,8 @@ class _CalorieCalculatorState extends State { ), onTap: () { setState(() { - if (weight < 250) weight++; + if (weight < 250) + weight++; }); }, ), @@ -541,137 +555,140 @@ class _CalorieCalculatorState extends State { ], ), ), - ], - ), - Texts('Select Unit'), - SizedBox( - height: 5.0, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - GestureDetector( - onTap: () { - setState(() { - updateColorWeight(1); - }); - }, - child: Container( - height: 55.0, - width: 150.0, - decoration: BoxDecoration( - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.5), - spreadRadius: 3, - blurRadius: 7, - offset: - Offset(0, 3), // changes position of shadow + Texts(TranslationBase.of(context).selectUnit), + SizedBox( + height: 5.0, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColorWeight(1); + }); + }, + child: Container( + padding: EdgeInsets.all(12), + margin: EdgeInsets.symmetric(horizontal: 8), + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.5), + spreadRadius: 3, + blurRadius: 7, + offset: Offset( + 0, 3), // changes position of shadow + ), + ], + color: kgCard, + borderRadius: BorderRadius.circular(3.0), + ), + child: Padding( + padding: const EdgeInsets.symmetric( + vertical: 0.0, horizontal: 18.0), + child: Center(child: Texts(TranslationBase.of(context).kg)), + ), ), - ], - color: kgCard, - borderRadius: BorderRadius.circular(3.0), - ), - child: Padding( - padding: const EdgeInsets.symmetric( - vertical: 0.0, horizontal: 18.0), - child: Center(child: Texts('KG')), + ), ), - ), - ), - GestureDetector( - onTap: () { - setState(() { - updateColorWeight(2); - }); - }, - child: Container( - height: 55.0, - width: 150.0, - decoration: BoxDecoration( - color: lbCard, - borderRadius: BorderRadius.circular(3.0), - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.5), - spreadRadius: 3, - blurRadius: 7, - offset: - Offset(0, 3), // changes position of shadow + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColorWeight(2); + }); + }, + child: Container( + padding: EdgeInsets.all(12), + margin: EdgeInsets.symmetric(horizontal: 8), + decoration: BoxDecoration( + color: lbCard, + borderRadius: BorderRadius.circular(3.0), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.5), + spreadRadius: 3, + blurRadius: 7, + offset: Offset( + 0, 3), // changes position of shadow + ), + ], + ), + child: Padding( + padding: + const EdgeInsets.symmetric(horizontal: 16.0), + child: Center(child: Texts(TranslationBase.of(context).pound)), + ), ), - ], + ), ), - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: Center(child: Texts('LB')), + ], + ), + SizedBox( + height: 8.0, + ), + Texts(TranslationBase.of(context).activityLevel), + Container( + child: DropdownButton( + value: dropdownValue, + icon: Icon(Icons.arrow_downward), + iconSize: 24, + elevation: 16, + style: TextStyle(color: Colors.black87), + underline: Container( + height: 2, + color: Colors.black54, ), + onChanged: (String newValue) { + setState(() { + dropdownValue = newValue; + }); + }, + items: [ + 'Almost Inactive(Little or no exercises)', + 'Lighty Active (1-3) days per week', + 'very Active(6-7) days per week', + 'Super Active(very hard exercises)' + ].map>((String value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), ), ), - ], - ), - SizedBox( - height: 5.0, - ), - Texts('Activity level'), - Container( - width: 300, - child: DropdownButton( - value: dropdownValue, - icon: Icon(Icons.arrow_downward), - iconSize: 24, - elevation: 16, - style: TextStyle(color: Colors.black87), - underline: Container( - height: 2, - color: Colors.black54, + SizedBox( + height: 25.0, ), - onChanged: (String newValue) { - setState(() { - dropdownValue = newValue; - }); - }, - items: [ - 'Almost Inactive(Little or no exercises)', - 'Lighty Active (1-3) days per week', - 'very Active(6-7) days per week', - 'Super Active(very hard exercises)' - ].map>((String value) { - return DropdownMenuItem( - value: value, - child: Text(value), - ); - }).toList(), - ), - ), - SizedBox( - height: 25.0, - ), - Container( - height: 100.0, - width: 350.0, - child: SecondaryButton( - label: 'CALCULATE', - onTap: () { - setState(() { - calculateCalories(); - print(calories); - { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => CalorieResultPage( - calorie: calories, - )), - ); - } - }); - }, - ), + ], ), - ], + ), + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0), + child: SecondaryButton( + label: TranslationBase.of(context).calculate, + onTap: () { + setState(() { + calculateCalories(); + print(calories); + { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => CalorieResultPage( + calorie: calories, + )), + ); + } + }); + }, ), ), - ), + ], ), ); } diff --git a/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_result_page.dart index 5c52ecb0..110b2afc 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_result_page.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -12,7 +13,8 @@ class CalorieResultPage extends StatelessWidget { @override Widget build(BuildContext context) { return AppScaffold( - appBarTitle: 'Calorie Calculator', + isShowDecPage: false, + appBarTitle: "${TranslationBase.of(context).calories} ${TranslationBase.of(context).calculators}", isShowAppBar: true, body: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, diff --git a/lib/pages/AlHabibMedicalService/health_converter.dart b/lib/pages/AlHabibMedicalService/health_converter.dart index 2b3b1a8e..5ae80183 100644 --- a/lib/pages/AlHabibMedicalService/health_converter.dart +++ b/lib/pages/AlHabibMedicalService/health_converter.dart @@ -18,6 +18,7 @@ class _HealthConverterState extends State { Widget build(BuildContext context) { return AppScaffold( isShowAppBar: true, + isShowDecPage: false, appBarTitle: TranslationBase.of(context).converters, body: Column( children: [ diff --git a/lib/pages/AlHabibMedicalService/​ health_calculators.dart b/lib/pages/AlHabibMedicalService/​ health_calculators.dart index d3bd4bed..80e0079f 100644 --- a/lib/pages/AlHabibMedicalService/​ health_calculators.dart +++ b/lib/pages/AlHabibMedicalService/​ health_calculators.dart @@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculat import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; @@ -37,7 +38,8 @@ class _HealthCalculatorsState extends State Widget build(BuildContext context) { return AppScaffold( isShowAppBar: true, - appBarTitle: 'Health Calculators', + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).calculators, body: Scaffold( extendBodyBehindAppBar: true, appBar: PreferredSize( @@ -72,13 +74,13 @@ class _HealthCalculatorsState extends State Container( width: MediaQuery.of(context).size.width * 0.35, child: Center( - child: Texts('General Health'), + child: Texts(TranslationBase.of(context).generalHealth), ), ), Container( width: MediaQuery.of(context).size.width * 0.35, child: Center( - child: Texts("Women's Health"), + child: Texts(TranslationBase.of(context).womanHealth), ), ), ], @@ -115,9 +117,9 @@ class _HealthCalculatorsState extends State ); }, child: MedicalProfileItem( - title: 'BMI', + title: TranslationBase.of(context).bmi, imagePath: 'bmi_health_calculator.png', - subTitle: 'Calculators', + subTitle: TranslationBase.of(context).calcHealth, ), ), ), @@ -133,9 +135,9 @@ class _HealthCalculatorsState extends State ); }, child: MedicalProfileItem( - title: 'Calories', + title: TranslationBase.of(context).calories, imagePath: 'calories-calculator.png', - subTitle: 'Calculators', + subTitle: TranslationBase.of(context).calcHealth, ), ), ), @@ -155,9 +157,9 @@ class _HealthCalculatorsState extends State ); }, child: MedicalProfileItem( - title: 'BMR', + title: TranslationBase.of(context).bmr, imagePath: 'BMR_calculator.png', - subTitle: 'Calculators', + subTitle: TranslationBase.of(context).calcHealth, ), ), ), @@ -173,9 +175,9 @@ class _HealthCalculatorsState extends State ); }, child: MedicalProfileItem( - title: 'Ideal Body', + title: TranslationBase.of(context).idealBody, imagePath: 'body_weight.png', - subTitle: 'Weight', + subTitle: TranslationBase.of(context).weight, ), ), ), @@ -195,9 +197,9 @@ class _HealthCalculatorsState extends State ); }, child: MedicalProfileItem( - title: 'Body', + title: TranslationBase.of(context).bodyWord, imagePath: 'body_fat.png', - subTitle: 'Fat', + subTitle: TranslationBase.of(context).fat, ), ), ), @@ -213,9 +215,9 @@ class _HealthCalculatorsState extends State ); }, child: MedicalProfileItem( - title: 'Carbohydrate', + title: TranslationBase.of(context).carbohydrate, imagePath: 'carb_protein.png', - subTitle: 'Protein Fat', + subTitle: TranslationBase.of(context).proteinFat, ), ), ), @@ -243,9 +245,9 @@ class _HealthCalculatorsState extends State ); }, child: MedicalProfileItem( - title: 'Ovulation', + title: TranslationBase.of(context).ovulation, imagePath: 'ovulation_period_icon.png', - subTitle: 'Period', + subTitle: TranslationBase.of(context).period, ), ), ), @@ -261,9 +263,9 @@ class _HealthCalculatorsState extends State ); }, child: MedicalProfileItem( - title: 'Delivery', + title: TranslationBase.of(context).delivery, imagePath: 'delivery_date_icon.png', - subTitle: 'Due Date', + subTitle: TranslationBase.of(context).dueDate, ), ), ), diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index e772a418..7e4e8fa9 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -212,6 +212,7 @@ class _SearchByClinicState extends State { }); } + // TODO Mosa_REMARk to come back later getDoctorsList(BuildContext context) { GifLoaderDialogUtils.showMyDialog(context); SearchInfo searchInfo = new SearchInfo(); diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 9bca1c03..a41bc11b 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -999,8 +999,41 @@ class TranslationBase { String get convertCholesterolStatement => localizedValues["convertCholesterolStatement"][locale.languageCode]; String get triglyceridesConvertStatement => localizedValues["triglyceridesConvertStatement"][locale.languageCode]; - String get bloodDEnterDesc => localizedValues["bloodD-enter-desc"][locale.languageCode]; + String get bloodDEnterDesc => + localizedValues["bloodD-enter-desc"][locale.languageCode]; String get viewTermsConditions => localizedValues["viewTermsConditions"][locale.languageCode]; + String get generalHealth => localizedValues["generalHealth"][locale.languageCode]; + String get womanHealth => localizedValues["womanHealth"][locale.languageCode]; + String get bmi => localizedValues["bmi"][locale.languageCode]; + String get calcHealth => localizedValues["calc-health"][locale.languageCode]; + String get calories => localizedValues["calories"][locale.languageCode]; + String get bmr => localizedValues["bmr"][locale.languageCode]; + String get idealBody => localizedValues["idealBody"][locale.languageCode]; + String get bodyWord => localizedValues["body_word"][locale.languageCode]; + String get fat => localizedValues["fat"][locale.languageCode]; + String get carbohydrate => localizedValues["carbohydrate"][locale.languageCode]; + String get proteinFat => localizedValues["proteinFat"][locale.languageCode]; + String get ovulation => localizedValues["ovulation"][locale.languageCode]; + String get delivery => localizedValues["delivery"][locale.languageCode]; + String get bmiCalcDesc => localizedValues["bmiCalcDesc"][locale.languageCode]; + String get selectUnit => localizedValues["selectUnit"][locale.languageCode]; + String get feet => localizedValues["feet"][locale.languageCode]; + String get pound => localizedValues["pound"][locale.languageCode]; + String get seeListOfDoctor => localizedValues["seeListOfDoctor"][locale.languageCode]; + String get obese => localizedValues["obese"][locale.languageCode]; + String get overWeight => localizedValues["overWeight"][locale.languageCode]; + String get healthy => localizedValues["healthy"][locale.languageCode]; + String get underWeight => localizedValues["underWeight"][locale.languageCode]; + String get bmiCalcMsgObese => localizedValues["bmiCalcMsgObese"][locale.languageCode]; + String get bmiCalcMsgOverweight => localizedValues["bmiCalcMsgOverweight"][locale.languageCode]; + String get bmiCalcMsgHealthy => localizedValues["bmiCalcMsgHealthy"][locale.languageCode]; + String get bmiCalcMsgUnderWeight => localizedValues["bmiCalcMsgUnderWeight"][locale.languageCode]; + String get bariatrics => localizedValues["bariatrics"][locale.languageCode]; + String get bariatricsHeaderMsg => localizedValues["bariatricsHeaderMsg"][locale.languageCode]; + String get continues => localizedValues["continue"][locale.languageCode]; + String get skip => localizedValues["skip"][locale.languageCode]; + String get calorieCalcDesc => localizedValues["calorieCalcDesc"][locale.languageCode]; + String get age11_120Years => localizedValues["age11_120_years"][locale.languageCode]; String get walkinAppo => localizedValues["WalkinAppo"][locale.languageCode]; String get videoAppo => localizedValues["videoAppo"][locale.languageCode]; String get weightAdd => localizedValues["weight-add"][locale.languageCode]; @@ -1059,7 +1092,6 @@ class TranslationBase { String get ml => localizedValues["ml"][locale.languageCode]; String get l => localizedValues["l"][locale.languageCode]; String get customLabel => localizedValues["custom-label"][locale.languageCode]; - String get selectUnit => localizedValues["select-unit"][locale.languageCode]; String get customLabelInLitres => localizedValues["custom-label-in-litres"][locale.languageCode]; String get customLabelInMililitres => localizedValues["custom-label-in-mililitres"][locale.languageCode]; String get amount_ => localizedValues["amount"][locale.languageCode]; diff --git a/pubspec.yaml b/pubspec.yaml index c94b0a0f..b891a671 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -189,6 +189,7 @@ flutter: - assets/images/login/ - assets/images/SmartWatches/ - assets/images/DQ/ + - assets/images/BMI/ - assets/json/ - assets/sounds/ - assets/images/svg/