Merge branch 'pharmacy' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into enad_pharmacy

# Conflicts:
#	lib/config/config.dart
#	lib/widgets/others/app_scaffold_widget.dart
merge-update-with-lab-changes
enadhilal 5 years ago
commit bf88d84022

@ -27,7 +27,7 @@ apply plugin: 'com.google.gms.google-services'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 30
compileSdkVersion 28
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
@ -41,7 +41,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.cloud.diplomaticquarterapp"
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true

@ -17,6 +17,9 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-feature android:name="android.hardware.location.network" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
<application
android:name="io.flutter.app.FlutterApplication"
android:icon="@mipmap/ic_launcher"
@ -69,6 +72,9 @@
android:name="flutterEmbedding"
android:value="2" />
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyCiD4YqVqLNYbt8-htvFy4Wp8XSph9E3wM"/>
</application>
<uses-permission android:name="android.permission.INTERNET" />

@ -2,4 +2,4 @@
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
org.gradle.jvmargs=-Xmx4608m
org.gradle.jvmargs=-Xmx4608m

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
<dict>
<key>aps-environment</key>
<string>development</string>
</dict>
</plist>

@ -6,7 +6,7 @@ import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
const MAX_SMALL_SCREEN = 660;
const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/';
const GET_PROJECT = 'Services/Lists.svc/REST/GetProject';
@ -29,8 +29,10 @@ const GET_PRESCRIPTION_REPORT_ENH =
///Lab Order
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults';
const GET_Patient_LAB_RESULT = '/Services/Patients.svc/REST/GetPatientLabResults';
const GET_Patient_LAB_SPECIAL_RESULT =
'Services/Patients.svc/REST/GetPatientLabSpecialResults';
const GET_Patient_LAB_RESULT =
'/Services/Patients.svc/REST/GetPatientLabResults';
///
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
@ -43,8 +45,7 @@ const SEND_RAD_REPORT_EMAIL =
///Feedback
const SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList';
const GET_STATUS_FOR_COCO = 'Services/COCWS.svc/REST/GetStatusforCOC';
const GET_PATIENT_AppointmentHistory =
'Services'
const GET_PATIENT_AppointmentHistory = 'Services'
'/Doctors.svc/REST/PateintHasAppoimentHistory';
///VITAL SIGN
@ -52,31 +53,50 @@ const GET_PATIENT_VITAL_SIGN =
'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
///Er Nearest
const GET_NEAREST_HOSPITAL=
const GET_NEAREST_HOSPITAL =
'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime';
///Er Nearest
const GET_AMBULANCE_REQUEST=
'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod';
const GET_AMBULANCE_REQUEST = 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod';
const GET_PATIENT_ALL_PRES_ORDERS= 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID= 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID';
///FindUs
const GET_FINDUS_REQUEST=
'Services/Lists.svc/REST/Get_HMG_Locations';
const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
///LiveChat
const GET_LIVECHAT_REQUEST=
'Services/Patients.svc/REST/GetPatientICProjects';
const GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects';
///babyInformation
const GET_BABYINFORMATION_REQUEST =
'Services/Community.svc/REST/GetBabyByUserID';
///Get Baby By User ID
const GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID';
///userInformation
const GET_USERINFORMATION_REQUEST =
'Services/Community.svc/REST/GetUserInformation_New';
///addNewChild
const GET_NEWCHILD_REQUEST = 'Services/Community.svc/REST/CreateNewBaby';
///newUserId
const GET_NEW_USER_REQUEST = 'Services/Community.svc/REST/CreateNewUser_New';
///delteChild
const DELETE_CHILD_REQUEST = 'Services/Community.svc/REST/DeleteBaby';
///addNewTABLE
const GET_TABLE_REQUEST = 'Services/Community.svc/REST/CreateVaccinationTable';
///BloodDenote
const GET_CITIES_REQUEST=
'Services/Lists.svc/REST/GetAllCities';
const GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities';
///BloodDetails
const GET_BLOOD_REQUEST=
const GET_BLOOD_REQUEST =
'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails';
///Reports
const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo';
const INSERT_REQUEST_FOR_MEDICAL_REPORT =
@ -104,7 +124,8 @@ const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject';
const GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime";
//URL to dental doctors list
const GET_DENTAL_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping";
const GET_DENTAL_DOCTORS_LIST_URL =
"Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping";
//URL to get doctor free slots
const GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots";
@ -118,8 +139,7 @@ const GET_PATIENT_SHARE =
"Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO";
//URL to get patient appointment history
const GET_PATIENT_APPOINTMENT_HISTORY =
"Services/Doctors.svc/REST/PateintHasAppoimentHistory";
const GET_PATIENT_APPOINTMENT_HISTORY = "Services/Doctors.svc/REST/PateintHasAppoimentHistory";
//URL to get patient appointment curfew history
const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY =
@ -129,6 +149,9 @@ const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY =
const CONFIRM_APPOINTMENT =
"Services/MobileNotifications.svc/REST/ConfirmAppointment";
const INSERT_VIDA_REQUEST =
"Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart";
//URL to cancel appointment
const CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment";
@ -158,6 +181,22 @@ const SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo';
const GET_LIVECARE_CLINICS =
'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics';
const GET_LIVECARE_SCHEDULE_CLINICS =
'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule';
const GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST =
'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID';
const GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS =
'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots';
const INSERT_LIVECARE_SCHEDULE_APPOINTMENT =
'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule';
const GET_PATIENT_SHARE_LIVECARE =
"Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare";
const GET_LIVECARE_CLINIC_TIMING =
'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule';
@ -175,16 +214,16 @@ const CANCEL_LIVECARE_REQUEST =
const SEND_LIVECARE_INVOICE_EMAIL =
'Services/Notifications.svc/REST/SendInvoiceForLiveCare';
const GET_USER_TERMS ='/Services/Patients.svc/REST/GetUserTermsAndConditions';
const UPDATE_HEALTH_TERMS ='/services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
const GET_USER_TERMS = '/Services/Patients.svc/REST/GetUserTermsAndConditions';
const UPDATE_HEALTH_TERMS =
'/services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
//URL to get medicine and pharmacies list
const CHANNEL = 3;
const GENERAL_ID = 'Cs2020@2016\$2958';
const IP_ADDRESS = '10.20.10.20';
const VERSION_ID = 5.6;
const SETUP_ID = '91877';
const SETUP_ID = '91877';
const LANGUAGE = 2;
const PATIENT_OUT_SA = 0;
const SESSION_ID = 'TMRhVmkGhOsvamErw';
@ -212,63 +251,86 @@ const GET_PATIENT_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave';
const SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail';
const GET_PATIENT_AdVANCE_BALANCE_AMOUNT = 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount';
const GET_PATIENT_INFO_BY_ID = 'Services/Doctors.svc/REST/GetPatientInfoByPatientID';
const GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER = 'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber';
const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment';
const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment';
///My Trackers
const GET_DIABETIC_RESULT_AVERAGE='Services/Patients.svc/REST/Patient_GetDiabeticResultAverage';
const GET_DIABTEC_RESULT='Services/Patients.svc/REST/Patient_GetDiabtecResults';
const ADD_DIABTEC_RESULT='Services/Patients.svc/REST/Patient_AddDiabtecResult';
const GET_PATIENT_AdVANCE_BALANCE_AMOUNT =
'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount';
const GET_PATIENT_INFO_BY_ID =
'Services/Doctors.svc/REST/GetPatientInfoByPatientID';
const GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER =
'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber';
const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT =
'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment';
const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT =
'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment';
const GET_BLOOD_PRESSURE_RESULT_AVERAGE='Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage';
const GET_BLOOD_PRESSURE_RESULT='Services/Patients.svc/REST/Patient_GetBloodPressureResult';
const ADD_BLOOD_PRESSURE_RESULT='Services/Patients.svc/REST/Patient_AddBloodPressureResult';
const GET_COVID_DRIVETHRU_PROJECT_LIST = 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter';
const GET_WEIGHT_PRESSURE_RESULT_AVERAGE='Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage';
const GET_WEIGHT_PRESSURE_RESULT='Services/Patients.svc/REST/Patient_GetWeightMeasurementResult';
const ADD_WEIGHT_PRESSURE_RESULT='Services/Patients.svc/REST/Patient_AddWeightMeasurementResult';
const GET_COVID_DRIVETHRU_PAYMENT_INFO = 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation';
const GET_COVID_DRIVETHRU_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFreeSlots';
const ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID='Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID';
const GET_CALL_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult';
const GET_CALL_REQUEST_TYPE_LOV = 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
///My Trackers
const GET_DIABETIC_RESULT_AVERAGE =
'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage';
const GET_DIABTEC_RESULT =
'Services/Patients.svc/REST/Patient_GetDiabtecResults';
const ADD_DIABTEC_RESULT =
'Services/Patients.svc/REST/Patient_AddDiabtecResult';
const GET_BLOOD_PRESSURE_RESULT_AVERAGE =
'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage';
const GET_BLOOD_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_GetBloodPressureResult';
const ADD_BLOOD_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_AddBloodPressureResult';
const GET_WEIGHT_PRESSURE_RESULT_AVERAGE =
'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage';
const GET_WEIGHT_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult';
const ADD_WEIGHT_PRESSURE_RESULT =
'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult';
const ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID =
'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID';
const GET_CALL_INFO_HOURS_RESULT =
'Services/Doctors.svc/REST/GetCallInfoHoursResult';
const GET_CALL_REQUEST_TYPE_LOV =
'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse';
const UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus';
const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo';
const GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies';
// H2O
const H2O_GET_USER_PROGRESS = "Services/H2ORemainder.svc/REST/H2O_GetUserProgress";
const H2O_INSERT_USER_ACTIVITY="Services/H2ORemainder.svc/REST/H2O_InsertUserActivity";
const H2O_GET_USER_PROGRESS =
"Services/H2ORemainder.svc/REST/H2O_GetUserProgress";
const H2O_INSERT_USER_ACTIVITY =
"Services/H2ORemainder.svc/REST/H2O_InsertUserActivity";
//E_Referral Services
const GET_ALL_RELATIONSHIP_TYPES = "Services/Patients.svc/REST/GetAllRelationshipTypes";
const SEND_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/SendActivationCodeForEReferral';
const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral';
const GET_ALL_RELATIONSHIP_TYPES =
"Services/Patients.svc/REST/GetAllRelationshipTypes";
const SEND_ACTIVATION_CODE_FOR_E_REFERRAL =
'Services/Authentication.svc/REST/SendActivationCodeForEReferral';
const CHECK_ACTIVATION_CODE_FOR_E_REFERRAL =
'Services/Authentication.svc/REST/CheckActivationCodeForEReferral';
const GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities';
const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral";
const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals";
<<<<<<< HEAD
//Pharmacy wishlist
const GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/";
=======
>>>>>>> 62efc13047052d287d62a39e3adbab7305cfe596
const TIMER_MIN = 10;
class AppGlobal {
@ -291,6 +353,7 @@ class AppGlobal {
request.TokenID = "@dm!n";
request.isDentalAllowedBackend = false;
request.DeviceTypeID = Platform.isIOS ? 1 : 2;
request.DeviceType = Platform.isIOS ? "iOS" : "Android";
return request;
}

@ -47,6 +47,8 @@ const Map<String, Map<String, String>> localizedValues = {
},
'confirmAppo': {'en': 'Confirm Appointment', 'ar': 'تأكيد الموعد'},
'confirm': {'en': 'Confirm', 'ar': 'تأكيد'},
'confirmLiveCare': {'en': 'Confirm LiveCare', 'ar': 'تأكيد لايف كير'},
'waitingForDoctor': {'en': 'Waiting for doctor', 'ar': 'في انتظار الطبيب'},
'appointment': {'en': 'Appointment', 'ar': 'الموعد'},
'confirmLater': {'en': 'Confirm Later', 'ar': 'تأكيد لاحقا'},
'todoList': {'en': 'Todo List', 'ar': 'مهامي'},
@ -58,6 +60,7 @@ const Map<String, Map<String, String>> localizedValues = {
'viewQR': {'en': 'View QR Code', 'ar': 'عرض رمز الاستجابة السريعة'},
'instruction': {'en': 'Instructions', 'ar': 'تعليمات'},
'livecare': {'en': 'LiveCare', 'ar': 'لايف كير'},
'livecareAppo': {'en': 'LiveCare Appointment', 'ar': 'الموعد لايف كير'},
'cancelAppoMsg': {
'en': 'Are you sure you want to cancel this appointment?',
'ar': 'هل أنت متأكد أنك تريد إلغاء هذا الموعد؟'
@ -376,6 +379,16 @@ const Map<String, Map<String, String>> localizedValues = {
"ar":
"السماح لتطبيق مجموعة الحبيب الطبية بالوصول إلى موقعك سيساعدك في إظهار المستشفيات وفقًا للأقرب إليك."
},
"user-view-requester": {
"en": "User Wants To View Your Medical File",
"ar": "أشخاص يرغبون الاطلاع على ملفك الطبي"
},
"user-view": {
"en": "User Can View Your Medical File",
"ar": "أشخاص يمكنهم الاطلاع على ملفك الطبي"
},
"parking": {"en": "Parking", "ar": "مواقف"},
"alhabiServices": {"en": "HMG Service", "ar": "خدمات الحبيب"},
"parkingTitle": {
@ -566,6 +579,15 @@ const Map<String, Map<String, String>> localizedValues = {
"All":{"en":"All","ar":"الكل"},
"QuestionHere":{"en":"Enter the question here...","ar":"اضف الاستفسار هنا"},
"ViewDoctorResponses":{"en":"View Doctor Responses","ar":"الاطلاع على ردود الأطباء"},
"ServiceInformationButton":{"en":"LOGIN / REGISTER","ar":"دخول / تسجيل"},
"ServiceInformationTitle":{"en":"Service Information","ar":"معلومات الخدمة"},
"info-lab": {
"en": "This service allows you to view the results of all laboratory tests performed in Al Habib Medical Group as well as sending the report via e-mail.",
"ar": "خدمة نتائج المختبر: هذه الخدمة تمكنك من الاطلاع على نتائج جميع الفحوصات المخبرية التي تمت في مجموعة الحبيب الطبية."
},
"info-radiology": {
"en": "This service allows you to view the reports and photos of radiology in Al Habib Medical Group as well as send the report by e-mail.",
"ar": "خدمة الاشعة: هذه الخدمة تمكنك من الاطلاع على تقارير وصور الاشعة التي تمت في مجموعة الحبيب الطبية وكذلك ارسال التقرير عن طريق الايميل."
},
};

@ -14,3 +14,5 @@ const FAMILY_FILE = 'family-file';
const USER_LAT = 'user-lat';
const USER_LONG = 'user-long';
const IS_GO_TO_PARKING = 'IS_GO_TO_PARKING';
const IS_SEARCH_APPO = 'is-search-appo';
const IS_LIVECARE_APPOINTMENT = 'is_livecare_appointment';

@ -0,0 +1,60 @@
import 'package:flutter/cupertino.dart';
enum Ambulate { Wheelchair, Walker, Stretcher, None }
extension SelectedAmbulate on Ambulate {
String getAmbulateTitle(BuildContext context) {
switch (this) {
case Ambulate.Wheelchair:
return 'Wheelchair';
break;
case Ambulate.Walker:
return 'Walker';
break;
case Ambulate.Stretcher:
return 'Stretcher';
break;
case Ambulate.None:
return 'None';
break;
}
return 'None';
}
int selectAmbulateNumber() {
switch (this) {
case Ambulate.Wheelchair:
return 0;
break;
case Ambulate.Walker:
return 1;
break;
case Ambulate.Stretcher:
return 2;
break;
case Ambulate.None:
return 3;
break;
}
return 3;
}
Ambulate getAmbulateById(int id) {
switch (id) {
case 0:
return Ambulate.Wheelchair;
break;
case 1:
return Ambulate.Walker;
break;
case 2:
return Ambulate.Stretcher;
break;
case 3:
return Ambulate.None;
break;
}
return Ambulate.None;
}
}

@ -0,0 +1,22 @@
enum OrderService { AMBULANCE }
extension SelectedOrderService on OrderService {
int getIdOrderService() {
switch (this) {
case OrderService.AMBULANCE:
return 4;
break;
}
return 4;
}
OrderService getOrderServiceById(int id) {
switch (id) {
case 4:
return OrderService.AMBULANCE;
break;
}
return OrderService.AMBULANCE;
}
}

@ -0,0 +1,45 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class List_BabyInformationModel {
int alertBy;
int babyID;
String babyName;
DateTime dOB;
int gender;
String genderDescription;
int patientID;
int userID;
List_BabyInformationModel(
{this.alertBy,
this.babyID,
this.babyName,
this.dOB,
this.gender,
this.genderDescription,
this.patientID,
this.userID});
List_BabyInformationModel.fromJson(Map<String, dynamic> json) {
alertBy = json['AlertBy'];
babyID = json['BabyID'];
babyName = json['BabyName'];
dOB = DateUtil.convertStringToDate(json['DOB']);
gender = json['Gender'];
genderDescription = json['GenderDescription'];
patientID = json['PatientID'];
userID = json['UserID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['AlertBy'] = this.alertBy;
data['BabyID'] = this.babyID;
data['BabyName'] = this.babyName;
data['DOB'] = this.dOB;
data['Gender'] = this.gender;
data['GenderDescription'] = this.genderDescription;
data['PatientID'] = this.patientID;
data['UserID'] = this.userID;
return data;
}
}

@ -0,0 +1,100 @@
class CreateNewBaby {
String babyName;
String gender;
String strDOB;
int editedBy;
int createdBy;
bool tempValue;
int userID;
bool isLogin;
int alertBy;
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
CreateNewBaby(
{this.babyName,
this.gender,
this.strDOB,
this.editedBy,
this.createdBy,
this.tempValue,
this.userID,
this.isLogin,
this.alertBy,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType});
CreateNewBaby.fromJson(Map<String, dynamic> json) {
babyName = json['BabyName'];
gender = json['Gender'];
strDOB = json['StrDOB'];
editedBy = json['EditedBy'];
createdBy = json['CreatedBy'];
tempValue = json['TempValue'];
userID = json['UserID'];
isLogin = json['IsLogin'];
alertBy = json['AlertBy'];
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['BabyName'] = this.babyName;
data['Gender'] = this.gender;
data['StrDOB'] = this.strDOB;
data['EditedBy'] = this.editedBy;
data['CreatedBy'] = this.createdBy;
data['TempValue'] = this.tempValue;
data['UserID'] = this.userID;
data['IsLogin'] = this.isLogin;
data['AlertBy'] = this.alertBy;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
return data;
}
}

@ -0,0 +1,165 @@
class CreateNewUser_New {
Null date;
int languageID;
int serviceName;
Null time;
Null androidLink;
Null authenticationTokenID;
Null data;
bool dataw;
int dietType;
Null errorCode;
Null errorEndUserMessage;
Null errorEndUserMessageN;
Null errorMessage;
int errorType;
int foodCategory;
Null iOSLink;
bool isAuthenticated;
int mealOrderStatus;
int mealType;
int messageStatus;
int numberOfResultRecords;
Null patientBlodType;
Null successMsg;
Null successMsgN;
Null htmlResult;
bool isHMGPatient;
bool isRegister;
bool isSendSMS;
Null listBabyInformationModel;
Null listBabyNeedReminderModel;
Null listCreateVaccinationTableModel;
Null listHisPatientModel;
Null listUserInformationModel;
Null listUserInformationModelNew;
Null listVaccinationTableModel;
Null tokinID;
int userID;
Null verificationCode;
CreateNewUser_New(
{this.date,
this.languageID,
this.serviceName,
this.time,
this.androidLink,
this.authenticationTokenID,
this.data,
this.dataw,
this.dietType,
this.errorCode,
this.errorEndUserMessage,
this.errorEndUserMessageN,
this.errorMessage,
this.errorType,
this.foodCategory,
this.iOSLink,
this.isAuthenticated,
this.mealOrderStatus,
this.mealType,
this.messageStatus,
this.numberOfResultRecords,
this.patientBlodType,
this.successMsg,
this.successMsgN,
this.htmlResult,
this.isHMGPatient,
this.isRegister,
this.isSendSMS,
this.listBabyInformationModel,
this.listBabyNeedReminderModel,
this.listCreateVaccinationTableModel,
this.listHisPatientModel,
this.listUserInformationModel,
this.listUserInformationModelNew,
this.listVaccinationTableModel,
this.tokinID,
this.userID,
this.verificationCode});
CreateNewUser_New.fromJson(Map<String, dynamic> json) {
date = json['Date'];
languageID = json['LanguageID'];
serviceName = json['ServiceName'];
time = json['Time'];
androidLink = json['AndroidLink'];
authenticationTokenID = json['AuthenticationTokenID'];
data = json['Data'];
dataw = json['Dataw'];
dietType = json['DietType'];
errorCode = json['ErrorCode'];
errorEndUserMessage = json['ErrorEndUserMessage'];
errorEndUserMessageN = json['ErrorEndUserMessageN'];
errorMessage = json['ErrorMessage'];
errorType = json['ErrorType'];
foodCategory = json['FoodCategory'];
iOSLink = json['IOSLink'];
isAuthenticated = json['IsAuthenticated'];
mealOrderStatus = json['MealOrderStatus'];
mealType = json['MealType'];
messageStatus = json['MessageStatus'];
numberOfResultRecords = json['NumberOfResultRecords'];
patientBlodType = json['PatientBlodType'];
successMsg = json['SuccessMsg'];
successMsgN = json['SuccessMsgN'];
htmlResult = json['HtmlResult'];
isHMGPatient = json['IsHMGPatient'];
isRegister = json['IsRegister'];
isSendSMS = json['IsSendSMS'];
listBabyInformationModel = json['List_BabyInformationModel'];
listBabyNeedReminderModel = json['List_BabyNeedReminderModel'];
listCreateVaccinationTableModel = json['List_CreateVaccinationTableModel'];
listHisPatientModel = json['List_His_PatientModel'];
listUserInformationModel = json['List_UserInformationModel'];
listUserInformationModelNew = json['List_UserInformationModel_New'];
listVaccinationTableModel = json['List_VaccinationTableModel'];
tokinID = json['TokinID'];
userID = json['UserID'];
verificationCode = json['VerificationCode'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Date'] = this.date;
data['LanguageID'] = this.languageID;
data['ServiceName'] = this.serviceName;
data['Time'] = this.time;
data['AndroidLink'] = this.androidLink;
data['AuthenticationTokenID'] = this.authenticationTokenID;
data['Data'] = this.data;
data['Dataw'] = this.dataw;
data['DietType'] = this.dietType;
data['ErrorCode'] = this.errorCode;
data['ErrorEndUserMessage'] = this.errorEndUserMessage;
data['ErrorEndUserMessageN'] = this.errorEndUserMessageN;
data['ErrorMessage'] = this.errorMessage;
data['ErrorType'] = this.errorType;
data['FoodCategory'] = this.foodCategory;
data['IOSLink'] = this.iOSLink;
data['IsAuthenticated'] = this.isAuthenticated;
data['MealOrderStatus'] = this.mealOrderStatus;
data['MealType'] = this.mealType;
data['MessageStatus'] = this.messageStatus;
data['NumberOfResultRecords'] = this.numberOfResultRecords;
data['PatientBlodType'] = this.patientBlodType;
data['SuccessMsg'] = this.successMsg;
data['SuccessMsgN'] = this.successMsgN;
data['HtmlResult'] = this.htmlResult;
data['IsHMGPatient'] = this.isHMGPatient;
data['IsRegister'] = this.isRegister;
data['IsSendSMS'] = this.isSendSMS;
data['List_BabyInformationModel'] = this.listBabyInformationModel;
data['List_BabyNeedReminderModel'] = this.listBabyNeedReminderModel;
data['List_CreateVaccinationTableModel'] =
this.listCreateVaccinationTableModel;
data['List_His_PatientModel'] = this.listHisPatientModel;
data['List_UserInformationModel'] = this.listUserInformationModel;
data['List_UserInformationModel_New'] = this.listUserInformationModelNew;
data['List_VaccinationTableModel'] = this.listVaccinationTableModel;
data['TokinID'] = this.tokinID;
data['UserID'] = this.userID;
data['VerificationCode'] = this.verificationCode;
return data;
}
}

@ -0,0 +1,25 @@
class CreateVaccinationTable {
String givenAt;
String status;
String vaccinesDescription;
String visit;
CreateVaccinationTable(
{this.givenAt, this.status, this.vaccinesDescription, this.visit});
CreateVaccinationTable.fromJson(Map<String, dynamic> json) {
givenAt = json['GivenAt'];
status = json['Status'];
vaccinesDescription = json['VaccinesDescription'];
visit = json['Visit'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['GivenAt'] = this.givenAt;
data['Status'] = this.status;
data['VaccinesDescription'] = this.vaccinesDescription;
data['Visit'] = this.visit;
return data;
}
}

@ -0,0 +1,76 @@
class DeleteBaby {
bool isLogin;
int babyID;
int editedBy;
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
DeleteBaby(
{this.isLogin,
this.babyID,
this.editedBy,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType});
DeleteBaby.fromJson(Map<String, dynamic> json) {
isLogin = json['IsLogin'];
babyID = json['BabyID'];
editedBy = json['EditedBy'];
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['IsLogin'] = this.isLogin;
data['BabyID'] = this.babyID;
data['EditedBy'] = this.editedBy;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
return data;
}
}

@ -0,0 +1,18 @@
class GET_VACCINATIONS_ITEMSMODEL {
String dESCRIPTION;
String iTEMCODE;
GET_VACCINATIONS_ITEMSMODEL({this.dESCRIPTION, this.iTEMCODE});
GET_VACCINATIONS_ITEMSMODEL.fromJson(Map<String, dynamic> json) {
dESCRIPTION = json['DESCRIPTION'];
iTEMCODE = json['ITEM_CODE'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['DESCRIPTION'] = this.dESCRIPTION;
data['ITEM_CODE'] = this.iTEMCODE;
return data;
}
}

@ -0,0 +1,48 @@
class List_UserInformationModel {
int userID;
String mobileNumber;
String nationalID;
String emailAddress;
int patientID;
int patientType;
bool patientOutSA;
int createdBy;
int editedBy;
List_UserInformationModel(
{this.userID,
this.mobileNumber,
this.nationalID,
this.emailAddress,
this.patientID,
this.patientType,
this.patientOutSA,
this.createdBy,
this.editedBy});
List_UserInformationModel.fromJson(Map<String, dynamic> json) {
userID = json['UserID'];
mobileNumber = json['MobileNumber'];
nationalID = json['NationalID'];
emailAddress = json['EmailAddress'];
patientID = json['PatientID'];
patientType = json['PatientType'];
patientOutSA = json['PatientOutSA'];
createdBy = json['CreatedBy'];
editedBy = json['EditedBy'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['UserID'] = this.userID;
data['MobileNumber'] = this.mobileNumber;
data['NationalID'] = this.nationalID;
data['EmailAddress'] = this.emailAddress;
data['PatientID'] = this.patientID;
data['PatientType'] = this.patientType;
data['PatientOutSA'] = this.patientOutSA;
data['CreatedBy'] = this.createdBy;
data['EditedBy'] = this.editedBy;
return data;
}
}

@ -0,0 +1,132 @@
class PatientAllPresOrders {
int iD;
String patientID;
bool patientOutSA;
bool isOutPatient;
int projectID;
int nearestProjectID;
double longitude;
double latitude;
String appointmentNo;
String dischargeID;
int lineItemNo;
int status;
String description;
String descriptionN;
String createdOn;
int serviceID;
int createdBy;
String editedOn;
int editedBy;
int channel;
dynamic clientRequestID;
bool returnedToQueue;
dynamic pickupDateTime;
dynamic pickupLocationName;
dynamic dropoffLocationName;
int realRRTHaveTransactions;
String nearestProjectDescription;
String nearestProjectDescriptionN;
String projectDescription;
String projectDescriptionN;
PatientAllPresOrders(
{this.iD,
this.patientID,
this.patientOutSA,
this.isOutPatient,
this.projectID,
this.nearestProjectID,
this.longitude,
this.latitude,
this.appointmentNo,
this.dischargeID,
this.lineItemNo,
this.status,
this.description,
this.descriptionN,
this.createdOn,
this.serviceID,
this.createdBy,
this.editedOn,
this.editedBy,
this.channel,
this.clientRequestID,
this.returnedToQueue,
this.pickupDateTime,
this.pickupLocationName,
this.dropoffLocationName,
this.realRRTHaveTransactions,
this.nearestProjectDescription,
this.nearestProjectDescriptionN,
this.projectDescription,
this.projectDescriptionN});
PatientAllPresOrders.fromJson(Map<String, dynamic> json) {
iD = json['ID'];
patientID = json['PatientID'];
patientOutSA = json['PatientOutSA'];
isOutPatient = json['IsOutPatient'];
projectID = json['ProjectID'];
nearestProjectID = json['NearestProjectID'];
longitude = json['Longitude'];
latitude = json['Latitude'];
appointmentNo = json['AppointmentNo'];
dischargeID = json['DischargeID'];
lineItemNo = json['LineItemNo'];
status = json['Status'];
description = json['Description'];
descriptionN = json['DescriptionN'];
createdOn = json['CreatedOn'];
serviceID = json['ServiceID'];
createdBy = json['CreatedBy'];
editedOn = json['EditedOn'];
editedBy = json['EditedBy'];
channel = json['Channel'];
clientRequestID = json['ClientRequestID'];
returnedToQueue = json['ReturnedToQueue'];
pickupDateTime = json['PickupDateTime'];
pickupLocationName = json['PickupLocationName'];
dropoffLocationName = json['DropoffLocationName'];
realRRTHaveTransactions = json['RealRRT_HaveTransactions'];
nearestProjectDescription = json['NearestProjectDescription'];
nearestProjectDescriptionN = json['NearestProjectDescriptionN'];
projectDescription = json['ProjectDescription'];
projectDescriptionN = json['ProjectDescriptionN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ID'] = this.iD;
data['PatientID'] = this.patientID;
data['PatientOutSA'] = this.patientOutSA;
data['IsOutPatient'] = this.isOutPatient;
data['ProjectID'] = this.projectID;
data['NearestProjectID'] = this.nearestProjectID;
data['Longitude'] = this.longitude;
data['Latitude'] = this.latitude;
data['AppointmentNo'] = this.appointmentNo;
data['DischargeID'] = this.dischargeID;
data['LineItemNo'] = this.lineItemNo;
data['Status'] = this.status;
data['Description'] = this.description;
data['DescriptionN'] = this.descriptionN;
data['CreatedOn'] = this.createdOn;
data['ServiceID'] = this.serviceID;
data['CreatedBy'] = this.createdBy;
data['EditedOn'] = this.editedOn;
data['EditedBy'] = this.editedBy;
data['Channel'] = this.channel;
data['ClientRequestID'] = this.clientRequestID;
data['ReturnedToQueue'] = this.returnedToQueue;
data['PickupDateTime'] = this.pickupDateTime;
data['PickupLocationName'] = this.pickupLocationName;
data['DropoffLocationName'] = this.dropoffLocationName;
data['RealRRT_HaveTransactions'] = this.realRRTHaveTransactions;
data['NearestProjectDescription'] = this.nearestProjectDescription;
data['NearestProjectDescriptionN'] = this.nearestProjectDescriptionN;
data['ProjectDescription'] = this.projectDescription;
data['ProjectDescriptionN'] = this.projectDescriptionN;
return data;
}
}

@ -0,0 +1,207 @@
import 'package:diplomaticquarterapp/core/enum/Ambulate.dart';
import 'get_all_transportation_method_list_model.dart';
class PatientER {
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
int patientID;
String tokenID;
int patientTypeID;
int patientType;
int orderServiceID;
String patientIdentificationID;
int direction;
bool haveAppointment;
int tripType;
int pickupUrgency;
int pickupSpot;
String pickupDateTime;
int transportationMethodId;
int selectedAmbulate;
String requesterNote;
int requesterFileNo;
String requesterMobileNo;
bool requesterIsOutSA;
int isOutPatient;
String pickupLocationName;
String dropoffLocationName;
int projectID;
int createdBy;
int lineItemNo;
int cost;
double vAT;
double totalPrice;
String pickupLocationLattitude;
String pickupLocationLongitude;
String dropoffLocationLattitude;
String dropoffLocationLongitude;
String latitude;
String longitude;
String appointmentNo;
dynamic appointmentClinicName;
dynamic appointmentDoctorName;
dynamic appointmentBranch;
dynamic appointmentTime;
PatientERTransportationMethod patientERTransportationMethod;
Ambulate ambulate;
PatientER(
{this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType,
this.orderServiceID = 4,
this.patientIdentificationID,
this.direction,
this.haveAppointment,
this.tripType,
this.pickupUrgency,
this.pickupSpot,
this.pickupDateTime,
this.transportationMethodId,
this.selectedAmbulate,
this.requesterNote,
this.requesterFileNo,
this.requesterMobileNo,
this.requesterIsOutSA,
this.isOutPatient,
this.pickupLocationName,
this.dropoffLocationName,
this.projectID,
this.createdBy,
this.lineItemNo,
this.cost,
this.vAT,
this.totalPrice,
this.pickupLocationLattitude,
this.pickupLocationLongitude,
this.dropoffLocationLattitude,
this.dropoffLocationLongitude,
this.latitude,
this.longitude,
this.appointmentNo,
this.appointmentClinicName,
this.appointmentDoctorName,
this.appointmentBranch,
this.appointmentTime,
this.patientERTransportationMethod,
this.ambulate});
PatientER.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
orderServiceID = json['OrderServiceID'];
patientIdentificationID = json['PatientIdentificationID'];
direction = json['Direction'];
haveAppointment = json['HaveAppointment'];
tripType = json['TripType'];
pickupUrgency = json['PickupUrgency'];
pickupSpot = json['PickupSpot'];
pickupDateTime = json['PickupDateTime'];
transportationMethodId = json['TransportationMethodId'];
selectedAmbulate = json['SelectedAmbulate'];
requesterNote = json['RequesterNote'];
requesterFileNo = json['RequesterFileNo'];
requesterMobileNo = json['RequesterMobileNo'];
requesterIsOutSA = json['RequesterIsOutSA'];
isOutPatient = json['IsOutPatient'];
pickupLocationName = json['PickupLocationName'];
dropoffLocationName = json['DropoffLocationName'];
projectID = json['ProjectID'];
createdBy = json['CreatedBy'];
lineItemNo = json['LineItemNo'];
cost = json['Cost'];
vAT = json['VAT'];
totalPrice = json['TotalPrice'];
pickupLocationLattitude = json['PickupLocationLattitude'];
pickupLocationLongitude = json['PickupLocationLongitude'];
dropoffLocationLattitude = json['DropoffLocationLattitude'];
dropoffLocationLongitude = json['DropoffLocationLongitude'];
latitude = json['Latitude'];
longitude = json['Longitude'];
appointmentNo = json['AppointmentNo'];
appointmentClinicName = json['AppointmentClinicName'];
appointmentDoctorName = json['AppointmentDoctorName'];
appointmentBranch = json['AppointmentBranch'];
appointmentTime = json['AppointmentTime'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
data['OrderServiceID'] = this.orderServiceID;
data['PatientIdentificationID'] = this.patientIdentificationID;
data['Direction'] = this.direction;
data['HaveAppointment'] = this.haveAppointment;
data['TripType'] = this.tripType;
data['PickupUrgency'] = this.pickupUrgency;
data['PickupSpot'] = this.pickupSpot;
data['PickupDateTime'] = this.pickupDateTime;
data['TransportationMethodId'] = this.transportationMethodId;
data['SelectedAmbulate'] = this.selectedAmbulate;
data['RequesterNote'] = this.requesterNote;
data['RequesterFileNo'] = this.requesterFileNo;
data['RequesterMobileNo'] = this.requesterMobileNo;
data['RequesterIsOutSA'] = this.requesterIsOutSA;
data['IsOutPatient'] = this.isOutPatient;
data['PickupLocationName'] = this.pickupLocationName;
data['DropoffLocationName'] = this.dropoffLocationName;
data['ProjectID'] = this.projectID;
data['CreatedBy'] = this.createdBy;
data['LineItemNo'] = this.lineItemNo;
data['Cost'] = this.cost;
data['VAT'] = this.vAT;
data['TotalPrice'] = this.totalPrice;
data['PickupLocationLattitude'] = this.pickupLocationLattitude;
data['PickupLocationLongitude'] = this.pickupLocationLongitude;
data['DropoffLocationLattitude'] = this.dropoffLocationLattitude;
data['DropoffLocationLongitude'] = this.dropoffLocationLongitude;
data['Latitude'] = this.latitude;
data['Longitude'] = this.longitude;
data['AppointmentNo'] = this.appointmentNo;
data['AppointmentClinicName'] = this.appointmentClinicName;
data['AppointmentDoctorName'] = this.appointmentDoctorName;
data['AppointmentBranch'] = this.appointmentBranch;
data['AppointmentTime'] = this.appointmentTime;
return data;
}
}

@ -0,0 +1,204 @@
class PickUpRequestPresOrder {
int id;
int presOrderID;
String createDate;
String lastEditDate;
int createdBy;
int lastEditBy;
bool isActive;
String requestNo;
int requesterId;
int direction;
bool haveAppointment;
dynamic appointmentId;
int tripType;
int pickupUrgency;
String pickupDateTime;
dynamic pickupLocationId;
int pickupSpot;
dynamic dropoffLocationId;
int transportationMethodId;
int cost;
double vAT;
double totalPrice;
int amountCollected;
int selectedAmbulate;
String requesterNote;
int status;
int paymentStatus;
dynamic rejectReason;
int visibility;
dynamic durationId;
dynamic imageId;
String requesterFileNo;
String requesterMobileNo;
bool requesterIsOutSA;
String pickupLocationLongitude;
String pickupLocationLattitude;
String dropoffLocationLongitude;
String dropoffLocationLattitude;
dynamic appointmentClinicName;
dynamic appointmentDoctorName;
dynamic appointmentBranch;
dynamic appointmentTime;
String pickupLocationName;
String dropoffLocationName;
String title;
String titleAR;
String ambulateDescription;
String ambulateDescriptionN;
PickUpRequestPresOrder(
{this.id,
this.presOrderID,
this.createDate,
this.lastEditDate,
this.createdBy,
this.lastEditBy,
this.isActive,
this.requestNo,
this.requesterId,
this.direction,
this.haveAppointment,
this.appointmentId,
this.tripType,
this.pickupUrgency,
this.pickupDateTime,
this.pickupLocationId,
this.pickupSpot,
this.dropoffLocationId,
this.transportationMethodId,
this.cost,
this.vAT,
this.totalPrice,
this.amountCollected,
this.selectedAmbulate,
this.requesterNote,
this.status,
this.paymentStatus,
this.rejectReason,
this.visibility,
this.durationId,
this.imageId,
this.requesterFileNo,
this.requesterMobileNo,
this.requesterIsOutSA,
this.pickupLocationLongitude,
this.pickupLocationLattitude,
this.dropoffLocationLongitude,
this.dropoffLocationLattitude,
this.appointmentClinicName,
this.appointmentDoctorName,
this.appointmentBranch,
this.appointmentTime,
this.pickupLocationName,
this.dropoffLocationName,
this.title,
this.titleAR,
this.ambulateDescription,
this.ambulateDescriptionN});
PickUpRequestPresOrder.fromJson(Map<String, dynamic> json) {
id = json['Id'];
presOrderID = json['PresOrderID'];
createDate = json['CreateDate'];
lastEditDate = json['LastEditDate'];
createdBy = json['CreatedBy'];
lastEditBy = json['LastEditBy'];
isActive = json['IsActive'];
requestNo = json['RequestNo'];
requesterId = json['RequesterId'];
direction = json['Direction'];
haveAppointment = json['HaveAppointment'];
appointmentId = json['AppointmentId'];
tripType = json['TripType'];
pickupUrgency = json['PickupUrgency'];
pickupDateTime = json['PickupDateTime'];
pickupLocationId = json['PickupLocationId'];
pickupSpot = json['PickupSpot'];
dropoffLocationId = json['DropoffLocationId'];
transportationMethodId = json['TransportationMethodId'];
cost = json['Cost'];
vAT = json['VAT'];
totalPrice = json['TotalPrice'];
amountCollected = json['AmountCollected'];
selectedAmbulate = json['SelectedAmbulate'];
requesterNote = json['RequesterNote'];
status = json['Status'];
paymentStatus = json['PaymentStatus'];
rejectReason = json['RejectReason'];
visibility = json['Visibility'];
durationId = json['DurationId'];
imageId = json['ImageId'];
requesterFileNo = json['RequesterFileNo'];
requesterMobileNo = json['RequesterMobileNo'];
requesterIsOutSA = json['RequesterIsOutSA'];
pickupLocationLongitude = json['PickupLocationLongitude'];
pickupLocationLattitude = json['PickupLocationLattitude'];
dropoffLocationLongitude = json['DropoffLocationLongitude'];
dropoffLocationLattitude = json['DropoffLocationLattitude'];
appointmentClinicName = json['AppointmentClinicName'];
appointmentDoctorName = json['AppointmentDoctorName'];
appointmentBranch = json['AppointmentBranch'];
appointmentTime = json['AppointmentTime'];
pickupLocationName = json['PickupLocationName'];
dropoffLocationName = json['DropoffLocationName'];
title = json['Title'];
titleAR = json['TitleAR'];
ambulateDescription = json['AmbulateDescription'];
ambulateDescriptionN = json['AmbulateDescriptionN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Id'] = this.id;
data['PresOrderID'] = this.presOrderID;
data['CreateDate'] = this.createDate;
data['LastEditDate'] = this.lastEditDate;
data['CreatedBy'] = this.createdBy;
data['LastEditBy'] = this.lastEditBy;
data['IsActive'] = this.isActive;
data['RequestNo'] = this.requestNo;
data['RequesterId'] = this.requesterId;
data['Direction'] = this.direction;
data['HaveAppointment'] = this.haveAppointment;
data['AppointmentId'] = this.appointmentId;
data['TripType'] = this.tripType;
data['PickupUrgency'] = this.pickupUrgency;
data['PickupDateTime'] = this.pickupDateTime;
data['PickupLocationId'] = this.pickupLocationId;
data['PickupSpot'] = this.pickupSpot;
data['DropoffLocationId'] = this.dropoffLocationId;
data['TransportationMethodId'] = this.transportationMethodId;
data['Cost'] = this.cost;
data['VAT'] = this.vAT;
data['TotalPrice'] = this.totalPrice;
data['AmountCollected'] = this.amountCollected;
data['SelectedAmbulate'] = this.selectedAmbulate;
data['RequesterNote'] = this.requesterNote;
data['Status'] = this.status;
data['PaymentStatus'] = this.paymentStatus;
data['RejectReason'] = this.rejectReason;
data['Visibility'] = this.visibility;
data['DurationId'] = this.durationId;
data['ImageId'] = this.imageId;
data['RequesterFileNo'] = this.requesterFileNo;
data['RequesterMobileNo'] = this.requesterMobileNo;
data['RequesterIsOutSA'] = this.requesterIsOutSA;
data['PickupLocationLongitude'] = this.pickupLocationLongitude;
data['PickupLocationLattitude'] = this.pickupLocationLattitude;
data['DropoffLocationLongitude'] = this.dropoffLocationLongitude;
data['DropoffLocationLattitude'] = this.dropoffLocationLattitude;
data['AppointmentClinicName'] = this.appointmentClinicName;
data['AppointmentDoctorName'] = this.appointmentDoctorName;
data['AppointmentBranch'] = this.appointmentBranch;
data['AppointmentTime'] = this.appointmentTime;
data['PickupLocationName'] = this.pickupLocationName;
data['DropoffLocationName'] = this.dropoffLocationName;
data['Title'] = this.title;
data['TitleAR'] = this.titleAR;
data['AmbulateDescription'] = this.ambulateDescription;
data['AmbulateDescriptionN'] = this.ambulateDescriptionN;
return data;
}
}

@ -1,23 +1,23 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class PatientER_RRT_GetAllTransportationMethodListModel {
int id;
class PatientERTransportationMethod {
dynamic id;
DateTime createDate;
DateTime lastEditDate;
int createdBy;
int lastEditBy;
dynamic createdBy;
dynamic lastEditBy;
bool isActive;
String title;
String titleAR;
int price;
Null isDefault;
int visibility;
Null durationId;
dynamic price;
dynamic isDefault;
dynamic visibility;
dynamic durationId;
String description;
String descriptionAR;
int totalPrice;
int vAT;
dynamic totalPrice;
dynamic vAT;
PatientER_RRT_GetAllTransportationMethodListModel(
PatientERTransportationMethod(
{
this.id,
this.createDate,
@ -36,7 +36,7 @@ class PatientER_RRT_GetAllTransportationMethodListModel {
this.totalPrice,
this.vAT});
PatientER_RRT_GetAllTransportationMethodListModel.fromJson(
PatientERTransportationMethod.fromJson(
Map<String, dynamic> json) {
id = json['Id'];
createDate = DateUtil.convertStringToDate(json['CreateDate']);

@ -2,16 +2,17 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
class AuthenticatedUserObject{
class AuthenticatedUserObject {
AuthenticatedUser user;
AppSharedPreferences sharedPref = AppSharedPreferences();
bool isLogin = false;
AuthenticatedUserObject(){
AuthenticatedUserObject() {
getUser();
}
getUser() async {
if (user==null) {
if (user == null) {
var userData = await sharedPref.getObject(USER_PROFILE);
if (userData != null) user = AuthenticatedUser.fromJson(userData);
}
@ -20,4 +21,7 @@ class AuthenticatedUserObject{
this.isLogin = isLogin != null;
}
logout() async {
isLogin = false;
}
}

@ -17,6 +17,7 @@ class BaseService {
AppSharedPreferences sharedPref = AppSharedPreferences();
BaseService() {
authenticatedUserObject.getUser();
user = authenticatedUserObject.user;
// getUser();
}

@ -0,0 +1,41 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/create_new_user_model.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
import '../base_service.dart';
class CreteNewBabyService extends BaseService {
List<CreateNewBaby> createNewBabyModelList = List();
List<List_UserInformationModel> userModelList = List();
List<CreateNewUser_New> newUserModelList = List();
Future getCreateNewBabyOrders({CreateNewBaby newChild,int userID}) async {
hasError = false;
await getUser();
Map<String, dynamic> body = Map.from(newChild.toJson());
body['CreatedBy'] = 102;
body['EditedBy'] = 102;
body['UserID'] = userID;
body['AlertBy'] = 2;
body['EmailAddress'] = user.emailAddress;
body['IsLogin'] = true;
body['LogInTokenID'] = await sharedPref.getString(TOKEN);
body['MobileNumber'] = user.mobileNumber;
body['NationalID'] = user.nationalityID;
body['ZipCode'] = user.zipCode;
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_NEWCHILD_REQUEST,
onSuccess: (dynamic response, int statusCode) {
var asd ="";
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
}

@ -0,0 +1,56 @@
import 'dart:convert';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
import '../base_service.dart';
class ChildVaccinesService extends BaseService {
List<List_BabyInformationModel> babyInformationModelList = List();
List<List_UserInformationModel> userInformationModelList = List();
int userID = 0;
Future getAllBabyInformationOrders() async {
Map<String, dynamic> body = Map();
hasError = false;
body['isDentalAllowedBackend'] = false;
body['IsLogin'] = true;
body['UserID'] = userID;
await baseAppClient.post(GET_BABY_BY_USER_ID,
onSuccess: (dynamic response, int statusCode) {
babyInformationModelList.clear();
response['List_BabyInformationModel'].forEach((vital) {
babyInformationModelList.add(List_BabyInformationModel.fromJson(vital));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future getNewUserOrders() async {
Map<String, dynamic> body = Map();
hasError = false;
await getUser();
body['CreatedBy'] = 102;
body['EditedBy'] = 102;
body['UserID'] = userID;
body['AlertBy'] = 2;
body['EmailAddress'] = user.emailAddress;
body['IsLogin'] = true;
body['LogInTokenID'] = await sharedPref.getString(TOKEN);
body['MobileNumber'] = user.mobileNumber;
body['NationalID'] = user.nationalityID;
body['ZipCode'] = user.zipCode;
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_NEW_USER_REQUEST,
onSuccess: (dynamic response, int statusCode) {
userID = response['UserID'];
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
}

@ -0,0 +1,75 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/create_new_user_model.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
import '../base_service.dart';
class DeleteBabyService extends BaseService{
List<CreateNewBaby> createNewBabyModelList = List();
List<List_UserInformationModel> userModelList = List();
List<CreateNewUser_New> newUserModelList = List();
List<DeleteBaby> deleteBabyModelList= List();
Future getDeleteBabyOrder({DeleteBaby deleteChild,int babyID}) async {
hasError = false;
await getUser();
Map<String, dynamic> body = Map.from(deleteChild.toJson());
// body['CreatedBy'] = 102;
body['EditedBy'] = 102;
//body['BabyID'] = babyID;
//body['BabyID'] = createNewBabyModelList ;
// body['AlertBy'] = 2;
// body['EmailAddress'] = user.emailAddress;
body['IsLogin'] = true;
body['LogInTokenID'] = await sharedPref.getString(TOKEN);
body['MobileNumber'] = user.mobileNumber;
body['NationalID'] = user.nationalityID;
body['ZipCode'] = user.zipCode;
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(DELETE_CHILD_REQUEST,
onSuccess: (dynamic response, int statusCode) {
var asd ="";
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
// Future getCreateNewBabyOrders({CreateNewBaby newChild,int userID}) async {
// hasError = false;
// await getUser();
// Map<String, dynamic> body = Map.from(newChild.toJson());
// body['CreatedBy'] = 102;
// body['EditedBy'] = 102;
// body['UserID'] = userID;
// body['AlertBy'] = 2;
// body['EmailAddress'] = user.emailAddress;
// body['IsLogin'] = true;
// body['LogInTokenID'] = await sharedPref.getString(TOKEN);
// body['MobileNumber'] = user.mobileNumber;
// body['NationalID'] = user.nationalityID;
// body['ZipCode'] = user.zipCode;
//
// body['isDentalAllowedBackend'] = false;
//
// await baseAppClient.post(GET_NEWCHILD_REQUEST,
// onSuccess: (dynamic response, int statusCode) {
// var asd ="";
// },
// onFailure: (String error, int statusCode) {
// hasError = true;
// super.error = error;
// }, body: body);
// }
}

@ -0,0 +1,27 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/get_vacainations_itemsmodel.dart';
import '../base_service.dart';
class GetVccinationsItemsService extends BaseService {
List<GET_VACCINATIONS_ITEMSMODEL> getVaccinationsItemModelList = List();
Map<String, dynamic> body = Map();
Future getaccinationsitemOrders() async {
hasError = false;
await baseAppClient.post(GET_TABLE_REQUEST,
onSuccess: (dynamic response, int statusCode) {
getVaccinationsItemModelList.clear();
response['List_CreateVaccinationTableModel'].forEach((vital) {
getVaccinationsItemModelList.add(
GET_VACCINATIONS_ITEMSMODEL.fromJson(vital));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
}

@ -0,0 +1,35 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
import '../base_service.dart';
class UserInformationService extends BaseService {
List<List_UserInformationModel> userInformationModelList = List();
Map<String, dynamic> body = Map();
Future getUserInformationOrders() async {
hasError = false;
await getUser();
body['CreatedBy'] = 102;
body['EditedBy'] = 102;
body['EmailAddress'] = user.emailAddress;
body['IsLogin'] = true;
body['LogInTokenID'] = await sharedPref.getString(TOKEN);
body['MobileNumber'] = user.mobileNumber;
body['NationalID'] = user.nationalityID;
body['ZipCode'] = user.zipCode;
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_USERINFORMATION_REQUEST,
onSuccess: (dynamic response, int statusCode) {
userInformationModelList.clear();
response['List_UserInformationModel_New'].forEach((vital) {
userInformationModelList.add(List_UserInformationModel.fromJson(vital));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
}

@ -0,0 +1,39 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/create_vaccination_table.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
import '../base_service.dart';
class VaccinationTableService extends BaseService {
List<CreateVaccinationTable> createVaccinationTableModelList = List();
Map<String, dynamic> body = Map();
Future getCreateVaccinationTableOrders() async {
hasError = false;
await getUser();
body['BabyName']="fffffffffff eeeeeeeeeeeeee";
body['DOB'] = "/Date(1585774800000+0300)/";
body['EmailAddress'] = user.emailAddress;
body['isDentalAllowedBackend'] = false;
body['SendEmail'] = false;
body['IsLogin'] =true;
await baseAppClient.post(GET_TABLE_REQUEST,
onSuccess: (dynamic response, int statusCode) {
createVaccinationTableModelList.clear();
response['List_CreateVaccinationTableModel'].forEach((vital) {
createVaccinationTableModelList.add(
CreateVaccinationTable.fromJson(vital));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
}

@ -15,7 +15,7 @@ AppSharedPreferences sharedPref = new AppSharedPreferences();
///await BaseAppClient.post('',
/// onSuccess: (dynamic response, int statusCode) {},
/// onFailure: (String error, int statusCode) {},
/// body: null);
/// body: Map();
class BaseAppClient {
post(String endPoint,
@ -32,7 +32,9 @@ class BaseAppClient {
var user = await sharedPref.getObject(USER_PROFILE);
if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null ? body['SetupID'] : SETUP_ID
? body['SetupID'] != null
? body['SetupID']
: SETUP_ID
: SETUP_ID;
}
body['VersionID'] = VERSION_ID;
@ -41,7 +43,9 @@ class BaseAppClient {
body['IPAdress'] = IP_ADDRESS;
body['generalid'] = GENERAL_ID;
body['PatientOutSA'] = body.containsKey('PatientOutSA')
? body['PatientOutSA'] != null ? body['PatientOutSA'] : PATIENT_OUT_SA
? body['PatientOutSA'] != null
? body['PatientOutSA']
: PATIENT_OUT_SA
: PATIENT_OUT_SA;
if (body.containsKey('isDentalAllowedBackend')) {
@ -55,30 +59,31 @@ class BaseAppClient {
body['DeviceTypeID'] = DeviceTypeID;
if(!body.containsKey('IsPublicRequest')) {
if (!body.containsKey('IsPublicRequest')) {
body['PatientType'] = body.containsKey('PatientType')
? body['PatientType'] != null ? body['PatientType'] : PATIENT_TYPE
? body['PatientType'] != null
? body['PatientType']
: PATIENT_TYPE
: PATIENT_TYPE;
body['PatientTypeID'] = body.containsKey('PatientTypeID')
? body['PatientTypeID'] != null
? body['PatientTypeID']
: PATIENT_TYPE_ID
? body['PatientTypeID']
: PATIENT_TYPE_ID
: PATIENT_TYPE_ID;
if (user != null) {
body['TokenID'] = token;
body['PatientID'] =
body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
body['PatientID'] != null ? body['PatientID'] : user['PatientID'];
body['PatientOutSA'] = user['OutSA'];
body['SessionID'] = getSessionId(token);
body['SessionID'] = SESSION_ID;//getSessionId(token);
}
}
print("URL : $url");
print("Body : ${json.encode(body)}");
var asd="";
if (await Utils.checkConnection()) {
final response = await http.post(url.trim(),
body: json.encode(body),
@ -169,6 +174,7 @@ class BaseAppClient {
}
String getSessionId(String id) {
return id.replaceAll(RegExp('/[^a-zA-Z ]'), '');
///return id.replaceAll(RegExp('/[^\w\s]/'), '');
// return id.replaceAll(RegExp('/[^a-zA-Z ]'), '');
}
}

@ -1,25 +1,76 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart';
import 'package:diplomaticquarterapp/core/model/er/PickUpRequestPresOrder.dart';
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
import '../base_service.dart';
class AmService extends BaseService {
List<PatientER_RRT_GetAllTransportationMethodListModel> AmModelList = List();
Map<String, dynamic> body = Map();
List<PatientERTransportationMethod> amModelList = List();
List<PatientAllPresOrders> patientAllPresOrdersList = List();
bool hasPendingOrder = false;
int pendingOrderID = 0;
String pendingOrderStatus = "";
String pendingOrderStatusAR = "";
PickUpRequestPresOrder pickUpRequestPresOrder;
Future getAllTransportationOrders() async {
hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
body['IdentificationNo'] = user.patientIdentificationNo;
await baseAppClient.post(GET_AMBULANCE_REQUEST,
onSuccess: (dynamic response, int statusCode) {
AmModelList.clear();
response['AmModelList'].forEach((vital) {
AmModelList.add(
PatientER_RRT_GetAllTransportationMethodListModel.fromJson(vital));
amModelList.clear();
response['PatientER_RRT_GetAllTransportationMethodList'].forEach((item) {
amModelList.add(PatientERTransportationMethod.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future getPatientAllPresOrdersList() async {
hasError = false;
hasPendingOrder = false;
await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS,
onSuccess: (dynamic response, int statusCode) {
patientAllPresOrdersList.clear();
response['PatientER_GetPatientAllPresOrdersList'].forEach((item) {
if (item['ServiceID'] == OrderService.AMBULANCE.getIdOrderService()) {
var order = PatientAllPresOrders.fromJson(item);
patientAllPresOrdersList.add(order);
if (order.status == 1) {
hasPendingOrder = true;
pendingOrderID = order.iD;
pendingOrderStatus = order.description;
pendingOrderStatusAR = order.descriptionN;
}
}
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: Map());
}
Future getOrderDetails() async {
hasError = false;
hasPendingOrder = false;
Map<String, dynamic> body = Map();
body['PresOrderID'] = pendingOrderID;
await baseAppClient.post(GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID,
onSuccess: (dynamic response, int statusCode) {
patientAllPresOrdersList.clear();
response['PatientER_RRT_GetPickUpRequestByPresOrderIDList']
.forEach((item) {
pickUpRequestPresOrder = PickUpRequestPresOrder.fromJson(item);
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: Map());
}
}

@ -1,13 +1,20 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:flutter/cupertino.dart';
class MedicalService extends BaseService {
List<AppoitmentAllHistoryResultList> appoitmentAllHistoryResultList = List();
getAppointmentHistory() async {
getAppointmentHistory({bool isActiveAppointment = false}) async {
hasError = false;
super.error = "";
Map<String, dynamic> body = Map();
if(isActiveAppointment) {
body['IsActiveAppointment'] = true;
body['isDentalAllowedBackend'] = false;
}
await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY,
onSuccess: (response, statusCode) async {
@ -19,6 +26,23 @@ class MedicalService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: Map());
}, body: body);
}
addAmbulanceRequest({@required PatientER patientER}) async {
hasError = false;
super.error = "";
Map<String, dynamic> body = Map();
body['RequesterFileNo'] = user.patientID;
body['RequesterMobileNo'] = user.mobileNumber;
body['RequesterIsOutSA'] = user.outSA;
await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY,
onSuccess: (response, statusCode) async {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
}

@ -18,6 +18,7 @@ class BaseViewModel extends ChangeNotifier {
AuthenticatedUser user;
AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
void setState(ViewState viewState) {
_state = viewState;

@ -0,0 +1,42 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart';
import 'package:diplomaticquarterapp/core/service/childvaccines/add_new_child_service.dart';
import 'package:diplomaticquarterapp/core/service/childvaccines/child_vaccines_service.dart';
import 'package:diplomaticquarterapp/core/service/childvaccines/delete_baby_service.dart';
import '../../../locator.dart';
import '../base_view_model.dart';
class AddNewChildViewModel extends BaseViewModel {
CreteNewBabyService _creteNewBabyService = locator<CreteNewBabyService>();
ChildVaccinesService _childVaccinesService = locator<ChildVaccinesService>();
// DeleteBabyService _deleteBabyService = locator<DeleteBabyService>();
bool isAdded = false;
///create new baby
createNewBabyOrders({ CreateNewBaby newChild}) async {
setState(ViewState.Busy);
await _creteNewBabyService.getCreateNewBabyOrders(newChild: newChild, userID: _childVaccinesService.userID);
if (_creteNewBabyService.hasError) {
error = _creteNewBabyService.error;
setState(ViewState.Error);
} else {
isAdded = true;
setState(ViewState.Idle);
await _childVaccinesService.getAllBabyInformationOrders();
if (_childVaccinesService.hasError) {
error = _childVaccinesService.error;
setState(ViewState.Error);
} else{
}
}
}
}

@ -0,0 +1,73 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart';
import 'package:diplomaticquarterapp/core/service/childvaccines/child_vaccines_service.dart';
//========
import 'package:diplomaticquarterapp/core/service/childvaccines/add_new_child_service.dart';
import 'package:diplomaticquarterapp/core/service/childvaccines/child_vaccines_service.dart';
import 'package:diplomaticquarterapp/core/service/childvaccines/delete_baby_service.dart';
import '../../../locator.dart';
import '../base_view_model.dart';
class ChildVaccinesViewModel extends BaseViewModel{
ChildVaccinesService _childVaccinesService = locator<ChildVaccinesService>();
List<List_BabyInformationModel> get babyInformationModelList=> _childVaccinesService.babyInformationModelList;
//===========
CreteNewBabyService _creteNewBabyService = locator<CreteNewBabyService>();
DeleteBabyService _deleteBabyService = locator<DeleteBabyService>();
bool isAdded = false;
bool isDeleted = false;
//============
getNewUserOrders() async {
setState(ViewState.Busy);
await _childVaccinesService.getNewUserOrders();
if (_childVaccinesService.hasError) {
error = _childVaccinesService.error;
setState(ViewState.Error);
} else
getBabyInformatioRequestOrders();
}
getBabyInformatioRequestOrders() async {
await _childVaccinesService.getAllBabyInformationOrders();
if (_childVaccinesService.hasError) {
error = _childVaccinesService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
///delete baby
deleteBabyOrders({ DeleteBaby newChild}) async {
setState(ViewState.Busy);
//await _creteNewBabyService.getCreateNewBabyOrders(newChild: newChild, userID: _childVaccinesService.userID);
await _deleteBabyService.getDeleteBabyOrder(deleteChild: newChild,babyID: newChild.babyID);
//getDeleteBabyOrder(deleteChild: newChild,);
// getDeleteBabyOrder
if (_creteNewBabyService.hasError) {
error = _creteNewBabyService.error;
setState(ViewState.Error);
} else {
isDeleted = true;
setState(ViewState.Idle);
await _childVaccinesService.getAllBabyInformationOrders();
if (_childVaccinesService.hasError) {
error = _childVaccinesService.error;
setState(ViewState.Error);
} else{
}
}
}
}

@ -0,0 +1,23 @@
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
import 'package:diplomaticquarterapp/core/service/childvaccines/user_information_service.dart';
import '../../../locator.dart';
import '../base_view_model.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
class UserInformationViewModel extends BaseViewModel {
UserInformationService _userInformationService =
locator<UserInformationService>();
List<List_UserInformationModel> get userInformationModelList =>
_userInformationService.userInformationModelList;
getUserInformationRequestOrders() async {
setState(ViewState.Busy);
await _userInformationService.getUserInformationOrders();
if (_userInformationService.hasError) {
error = _userInformationService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
}

@ -0,0 +1,30 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/create_vaccination_table.dart';
import 'package:diplomaticquarterapp/core/service/childvaccines/add_new_child_service.dart';
import 'package:diplomaticquarterapp/core/service/childvaccines/vaccination_table_service.dart';
import '../../../locator.dart';
import '../base_view_model.dart';
class VaccinationTableViewModel extends BaseViewModel{
VaccinationTableService _creteVaccinationTableService = locator<VaccinationTableService>();
// String get creteVaccinationTableContent => _creteVaccinationTableService.userAgreementContent;
//String get userAgreementContent => _creteNewBabyService.v//_reportsService.userAgreementContent;
List<CreateVaccinationTable> get creteVaccinationTableModelList=> _creteVaccinationTableService.createVaccinationTableModelList;//.createNewBabyModelList;
getCreateVaccinationTable() async {
setState(ViewState.Busy);
await _creteVaccinationTableService.getCreateVaccinationTableOrders();//getCreateNewBabyOrders();
if ( _creteVaccinationTableService.hasError) {
error = _creteVaccinationTableService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
}

@ -1,32 +1,82 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart';
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/service/er/am_service.dart';
import 'package:diplomaticquarterapp/core/service/hospital_service.dart';
import 'package:diplomaticquarterapp/core/service/medical/medical_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import '../base_view_model.dart';
import '../../../locator.dart';
class AmRequestViewModel extends BaseViewModel{
class AmRequestViewModel extends BaseViewModel {
AmService _amService = locator<AmService>();
HospitalService _hospitalService = locator<HospitalService>();
MedicalService _medicalService = locator<MedicalService>();
List<PatientERTransportationMethod> get amRequestModeList =>
_amService.amModelList;
AmService _amService = locator<AmService>();
List<PatientAllPresOrders> get patientAllPresOrdersList =>
_amService.patientAllPresOrdersList;
List<PatientER_RRT_GetAllTransportationMethodListModel> get AmRequestModeList=>
_amService.AmModelList;
List<AppoitmentAllHistoryResultList> get appoitmentAllHistoryResultList =>
_medicalService.appoitmentAllHistoryResultList;
getAmRequestOrders({int id, int projectID}) async {
setState(ViewState.Busy);
List<HospitalsModel> get hospitals => _hospitalService.hospitals;
bool get hasPendingOrder =>_amService.hasPendingOrder;
await _amService.getAllTransportationOrders();
Future getAppointmentHistory() async {
setState(ViewState.BusyLocal);
await _medicalService.getAppointmentHistory(isActiveAppointment: true);
if (_medicalService.hasError) {
error = _medicalService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
if ( _amService.hasError) {
error = _amService.error;
Future getAmRequestOrders() async {
setState(ViewState.Busy);
await _amService.getAllTransportationOrders();
if (_amService.hasError) {
error = _amService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
getHospitals();
}
Future getHospitals() async {
setState(ViewState.Busy);
await _hospitalService.getHospitals();
if (_hospitalService.hasError) {
error = _hospitalService.error;
setState(ViewState.Error);
} else
getPatientAllPresOrdersList();
}
Future getPatientAllPresOrdersList() async {
setState(ViewState.Busy);
await _amService.getPatientAllPresOrdersList();
if (_hospitalService.hasError) {
error = _hospitalService.error;
setState(ViewState.Error);
} else if (_amService.hasPendingOrder) {
getOrderDetails();
} else
setState(ViewState.Idle);
}
}
Future getOrderDetails() async {
setState(ViewState.Busy);
await _amService.getOrderDetails();
if (_hospitalService.hasError) {
error = _hospitalService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
}

@ -21,52 +21,54 @@ class LabsViewModel extends BaseViewModel {
: _patientLabOrdersListHospital;
void getLabs() async {
setState(ViewState.Busy);
await _labsService.getPatientLabOrdersList();
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);
} else {
_labsService.patientLabOrdersList.forEach((element) {
List<PatientLabOrdersList> patientLabOrdersClinic =
_patientLabOrdersListClinic
.where((elementClinic) =>
elementClinic.filterName == element.clinicDescription)
.toList();
if (authenticatedUserObject.isLogin) {
setState(ViewState.Busy);
await _labsService.getPatientLabOrdersList();
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);
} else {
_labsService.patientLabOrdersList.forEach((element) {
List<PatientLabOrdersList> patientLabOrdersClinic =
_patientLabOrdersListClinic
.where((elementClinic) =>
elementClinic.filterName == element.clinicDescription)
.toList();
if (patientLabOrdersClinic.length != 0) {
_patientLabOrdersListClinic[_patientLabOrdersListClinic
.indexOf(patientLabOrdersClinic[0])]
.patientLabOrdersList
.add(element);
} else {
_patientLabOrdersListClinic.add(PatientLabOrdersList(
filterName: element.clinicDescription,
patientDoctorAppointment: element));
}
if (patientLabOrdersClinic.length != 0) {
_patientLabOrdersListClinic[_patientLabOrdersListClinic
.indexOf(patientLabOrdersClinic[0])]
.patientLabOrdersList
.add(element);
} else {
_patientLabOrdersListClinic.add(PatientLabOrdersList(
filterName: element.clinicDescription,
patientDoctorAppointment: element));
}
// doctor list sort via project
List<PatientLabOrdersList> patientLabOrdersHospital =
_patientLabOrdersListHospital
.where(
(elementClinic) =>
elementClinic.filterName == element.projectName,
)
.toList();
// doctor list sort via project
List<PatientLabOrdersList> patientLabOrdersHospital =
_patientLabOrdersListHospital
.where(
(elementClinic) =>
elementClinic.filterName == element.projectName,
)
.toList();
if (patientLabOrdersHospital.length != 0) {
_patientLabOrdersListHospital[_patientLabOrdersListHospital
.indexOf(patientLabOrdersHospital[0])]
.patientLabOrdersList
.add(element);
} else {
_patientLabOrdersListHospital.add(PatientLabOrdersList(
filterName: element.projectName,
patientDoctorAppointment: element));
}
});
if (patientLabOrdersHospital.length != 0) {
_patientLabOrdersListHospital[_patientLabOrdersListHospital
.indexOf(patientLabOrdersHospital[0])]
.patientLabOrdersList
.add(element);
} else {
_patientLabOrdersListHospital.add(PatientLabOrdersList(
filterName: element.projectName,
patientDoctorAppointment: element));
}
});
setState(ViewState.Idle);
setState(ViewState.Idle);
}
}
}

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/service/medical/medical_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
@ -11,13 +12,15 @@ class MedicalViewModel extends BaseViewModel {
_medicalService.appoitmentAllHistoryResultList;
getAppointmentHistory() async {
setState(ViewState.Busy);
if (_medicalService.appoitmentAllHistoryResultList.length == 0)
await _medicalService.getAppointmentHistory();
if (_medicalService.hasError) {
error = _medicalService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
if (authenticatedUserObject.isLogin) {
setState(ViewState.Busy);
if (_medicalService.appoitmentAllHistoryResultList.length == 0)
await _medicalService.getAppointmentHistory();
if (_medicalService.hasError) {
error = _medicalService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
}
}

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/H2O_service.dart';
import 'package:diplomaticquarterapp/core/service/qr_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/uitl/navigation_service.dart';
import 'package:get_it/get_it.dart';
@ -10,6 +11,11 @@ import 'core/service/AuthenticatedUserObject.dart';
import 'core/service/appointment_rate_service.dart';
import 'core/service/blood/blood_details_servies.dart';
import 'core/service/blood/blood_donation_service.dart';
import 'core/service/childvaccines/add_new_child_service.dart';
import 'core/service/childvaccines/child_vaccines_service.dart';
import 'core/service/childvaccines/delete_baby_service.dart';
import 'core/service/childvaccines/user_information_service.dart';
import 'core/service/childvaccines/vaccination_table_service.dart';
import 'core/service/contactus/finadus_service.dart';
import 'core/service/contactus/livechat_service.dart';
import 'core/service/dashboard_service.dart';
@ -37,6 +43,9 @@ import 'core/viewModels/all_habib_medical_services/e_referral_view_model.dart';
import 'core/viewModels/appointment_rate_view_model.dart';
import 'core/viewModels/blooddonation/blood_details_view_model.dart';
import 'core/viewModels/blooddonation/booddonation_view_model.dart';
import 'core/viewModels/child_vaccines/add_new_child_view_model.dart';
import 'core/viewModels/child_vaccines/child_vaccines_view_model.dart';
import 'core/viewModels/child_vaccines/vaccination_table_view_model.dart';
import 'core/viewModels/contactus/findus_view_model.dart';
import 'core/viewModels/contactus/livechat_view_model.dart';
import 'core/viewModels/er/am_request_view_model.dart';
@ -112,6 +121,15 @@ void setupLocator() {
locator.registerLazySingleton(() => BloodDonationService());
locator.registerLazySingleton(() => BloodDetailsService());
locator.registerLazySingleton(() => ChildVaccinesService());
locator.registerLazySingleton(() => UserInformationService());
locator.registerLazySingleton(() => CreteNewBabyService());
locator.registerLazySingleton(() => DeleteBabyService());
locator.registerLazySingleton(() => VaccinationTableService());
/// View Model
locator.registerFactory(() => HospitalViewModel());
@ -139,6 +157,13 @@ void setupLocator() {
locator.registerFactory(() => LiveChatViewModel());
locator.registerFactory(() => BloodDonationViewModel());
locator.registerFactory(() => BloodDeatailsViewModel());
locator.registerFactory(() => ChildVaccinesViewModel());
locator.registerFactory(() => UserInformationViewModel());
locator.registerFactory(() => VaccinationTableViewModel());
locator.registerFactory(() => AddNewChildViewModel());
locator.registerFactory(() => H2OViewModel());
locator.registerFactory(() => BloodSugarViewMode());

@ -66,7 +66,8 @@ class MyApp extends StatelessWidget {
hintColor: Colors.grey[400],
disabledColor: Colors.grey[300],
errorColor: Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor:Hexcolor('#E9E9E9'),// Colors.grey[100],
scaffoldBackgroundColor:
HexColor('#E9E9E9'), // Colors.grey[100],
textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
textSelectionHandleColor: Colors.grey,
canvasColor: Colors.white,
@ -74,9 +75,8 @@ class MyApp extends StatelessWidget {
highlightColor: Colors.grey[100].withOpacity(0.4),
splashColor: Colors.transparent,
primaryColor: Colors.grey,
bottomSheetTheme:BottomSheetThemeData(
backgroundColor: Hexcolor('#E0E0E0')
) ,
bottomSheetTheme: BottomSheetThemeData(
backgroundColor: HexColor('#E0E0E0')),
cursorColor: Colors.grey,
iconTheme: IconThemeData(),
appBarTheme: AppBarTheme(

@ -64,73 +64,75 @@ class AppoitmentAllHistoryResultList {
String qR;
int remaniningHoursTocanPay;
bool sMSButtonVisable;
int serviceID;
AppoitmentAllHistoryResultList(
{this.setupID,
this.projectID,
this.appointmentNo,
this.appointmentDate,
this.appointmentDateN,
this.appointmentType,
this.bookDate,
this.patientType,
this.patientID,
this.clinicID,
this.doctorID,
this.endDate,
this.startTime,
this.endTime,
this.status,
this.visitType,
this.visitFor,
this.patientStatusType,
this.companyID,
this.bookedBy,
this.bookedOn,
this.confirmedBy,
this.confirmedOn,
this.arrivalChangedBy,
this.arrivedOn,
this.editedBy,
this.editedOn,
this.doctorName,
this.doctorNameN,
this.statusDesc,
this.statusDescN,
this.vitalStatus,
this.vitalSignAppointmentNo,
this.episodeID,
this.actualDoctorRate,
this.clinicName,
this.complainExists,
this.doctorImageURL,
this.doctorNameObj,
this.doctorRate,
this.doctorSpeciality,
this.doctorTitle,
this.gender,
this.genderDescription,
this.iSAllowOnlineCheckedIN,
this.isActiveDoctor,
this.isActiveDoctorProfile,
this.isDoctorAllowVedioCall,
this.isExecludeDoctor,
this.isFollowup,
this.isLiveCareAppointment,
this.isMedicalReportRequested,
this.isOnlineCheckedIN,
this.latitude,
this.listHISGetContactLensPerscription,
this.listHISGetGlassPerscription,
this.longitude,
this.nextAction,
this.noOfPatientsRate,
this.originalClinicID,
this.originalProjectID,
this.projectName,
this.qR,
this.remaniningHoursTocanPay,
this.sMSButtonVisable});
this.projectID,
this.appointmentNo,
this.appointmentDate,
this.appointmentDateN,
this.appointmentType,
this.bookDate,
this.patientType,
this.patientID,
this.clinicID,
this.doctorID,
this.endDate,
this.startTime,
this.endTime,
this.status,
this.visitType,
this.visitFor,
this.patientStatusType,
this.companyID,
this.bookedBy,
this.bookedOn,
this.confirmedBy,
this.confirmedOn,
this.arrivalChangedBy,
this.arrivedOn,
this.editedBy,
this.editedOn,
this.doctorName,
this.doctorNameN,
this.statusDesc,
this.statusDescN,
this.vitalStatus,
this.vitalSignAppointmentNo,
this.episodeID,
this.actualDoctorRate,
this.clinicName,
this.complainExists,
this.doctorImageURL,
this.doctorNameObj,
this.doctorRate,
this.doctorSpeciality,
this.doctorTitle,
this.gender,
this.genderDescription,
this.iSAllowOnlineCheckedIN,
this.isActiveDoctor,
this.isActiveDoctorProfile,
this.isDoctorAllowVedioCall,
this.isExecludeDoctor,
this.isFollowup,
this.isLiveCareAppointment,
this.isMedicalReportRequested,
this.isOnlineCheckedIN,
this.latitude,
this.listHISGetContactLensPerscription,
this.listHISGetGlassPerscription,
this.longitude,
this.nextAction,
this.noOfPatientsRate,
this.originalClinicID,
this.originalProjectID,
this.projectName,
this.qR,
this.remaniningHoursTocanPay,
this.sMSButtonVisable,
this.serviceID});
AppoitmentAllHistoryResultList.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
@ -173,7 +175,9 @@ class AppoitmentAllHistoryResultList {
doctorImageURL = json['DoctorImageURL'];
doctorNameObj = json['DoctorNameObj'];
doctorRate = json['DoctorRate'];
doctorSpeciality = json['DoctorSpeciality'] != null ?json['DoctorSpeciality'].cast<String>() : ["null"];
doctorSpeciality = json['DoctorSpeciality'] != null
? json['DoctorSpeciality'].cast<String>()
: ["null"];
doctorTitle = json['DoctorTitle'];
gender = json['Gender'];
genderDescription = json['GenderDescription'];
@ -188,7 +192,7 @@ class AppoitmentAllHistoryResultList {
isOnlineCheckedIN = json['IsOnlineCheckedIN'];
latitude = json['Latitude'];
listHISGetContactLensPerscription =
json['List_HIS_GetContactLensPerscription'];
json['List_HIS_GetContactLensPerscription'];
listHISGetGlassPerscription = json['List_HIS_GetGlassPerscription'];
longitude = json['Longitude'];
nextAction = json['NextAction'];
@ -199,6 +203,7 @@ class AppoitmentAllHistoryResultList {
qR = json['QR'];
remaniningHoursTocanPay = json['RemaniningHoursTocanPay'];
sMSButtonVisable = json['SMSButtonVisable'];
serviceID = json['ServiceID'];
}
Map<String, dynamic> toJson() {
@ -269,6 +274,7 @@ class AppoitmentAllHistoryResultList {
data['QR'] = this.qR;
data['RemaniningHoursTocanPay'] = this.remaniningHoursTocanPay;
data['SMSButtonVisable'] = this.sMSButtonVisable;
data['ServiceID'] = this.serviceID;
return data;
}
}
@ -278,7 +284,8 @@ class PatientAppointmentList {
List<AppoitmentAllHistoryResultList> patientDoctorAppointmentList = List();
PatientAppointmentList(
{this.filterName, AppoitmentAllHistoryResultList patientDoctorAppointment}) {
{this.filterName,
AppoitmentAllHistoryResultList patientDoctorAppointment}) {
patientDoctorAppointmentList.add(patientDoctorAppointment);
}
}

@ -174,7 +174,9 @@ class PatientDoctorAppointmentList {
List<DoctorList> patientDoctorAppointmentList = List();
PatientDoctorAppointmentList(
{this.filterName, this.distanceInKMs, DoctorList patientDoctorAppointment}) {
{this.filterName,
this.distanceInKMs,
DoctorList patientDoctorAppointment}) {
patientDoctorAppointmentList.add(patientDoctorAppointment);
}
}

@ -13,7 +13,6 @@ class InsertAppointmentRequest extends Request {
bool IsVirtual;
List<String> GeneralProcedureList;
String DeviceToken;
String DeviceType;
bool IsForLiveCare;
String OriginalClinicID;
String OriginalProjectID;

@ -1,104 +1,108 @@
class PatientShareResponse {
int advanceNumber;
String appointmentDate;
dynamic appointmentDate;
int appointmentNo;
int cashPrice;
int cashPriceTax;
int cashPriceWithTax;
int clinicID;
String clinicName;
dynamic clinicName;
int companyId;
String companyName;
dynamic companyName;
int companyShareWithTax;
String doctorImageURL;
String doctorNameObj;
List<String> doctorSpeciality;
Null errCode;
dynamic doctorImageURL;
dynamic doctorNameObj;
int doctorID;
List<dynamic> doctorSpeciality;
dynamic errCode;
int groupID;
bool iSAllowOnlineCheckedIN;
Null insurancePolicyNo;
dynamic insurancePolicyNo;
bool isExcludedForOnlineCheckin;
int isFollowup;
bool isLiveCareAppointment;
bool isOnlineCheckedIN;
String message;
dynamic message;
int nextAction;
Null patientCardID;
dynamic patientCardID;
int patientID;
dynamic patientShare;
dynamic patientShareWithTax;
int patientStatusType;
dynamic patientTaxAmount;
String patientType;
dynamic patientType;
int paymentAmount;
String paymentDate;
Null paymentMethodName;
Null paymentReferenceNumber;
dynamic paymentDate;
dynamic paymentMethodName;
dynamic paymentReferenceNumber;
int policyId;
String policyName;
String procedureName;
dynamic policyName;
dynamic procedureName;
int projectID;
String projectName;
Null setupID;
dynamic projectName;
dynamic setupID;
int sourceType;
String startTime;
dynamic startTime;
int status;
int statusCode;
Null statusDesc;
Null subPolicyNo;
dynamic statusDesc;
dynamic subPolicyNo;
int userID;
int serviceID;
PatientShareResponse(
{this.advanceNumber,
this.appointmentDate,
this.appointmentNo,
this.cashPrice,
this.cashPriceTax,
this.cashPriceWithTax,
this.clinicID,
this.clinicName,
this.companyId,
this.companyName,
this.companyShareWithTax,
this.doctorImageURL,
this.doctorNameObj,
this.doctorSpeciality,
this.errCode,
this.groupID,
this.iSAllowOnlineCheckedIN,
this.insurancePolicyNo,
this.isExcludedForOnlineCheckin,
this.isFollowup,
this.isLiveCareAppointment,
this.isOnlineCheckedIN,
this.message,
this.nextAction,
this.patientCardID,
this.patientID,
this.patientShare,
this.patientShareWithTax,
this.patientStatusType,
this.patientTaxAmount,
this.patientType,
this.paymentAmount,
this.paymentDate,
this.paymentMethodName,
this.paymentReferenceNumber,
this.policyId,
this.policyName,
this.procedureName,
this.projectID,
this.projectName,
this.setupID,
this.sourceType,
this.startTime,
this.status,
this.statusCode,
this.statusDesc,
this.subPolicyNo,
this.userID});
this.appointmentDate,
this.appointmentNo,
this.cashPrice,
this.cashPriceTax,
this.cashPriceWithTax,
this.clinicID,
this.clinicName,
this.companyId,
this.companyName,
this.companyShareWithTax,
this.doctorID,
this.doctorImageURL,
this.doctorNameObj,
this.doctorSpeciality,
this.errCode,
this.groupID,
this.iSAllowOnlineCheckedIN,
this.insurancePolicyNo,
this.isExcludedForOnlineCheckin,
this.isFollowup,
this.isLiveCareAppointment,
this.isOnlineCheckedIN,
this.message,
this.nextAction,
this.patientCardID,
this.patientID,
this.patientShare,
this.patientShareWithTax,
this.patientStatusType,
this.patientTaxAmount,
this.patientType,
this.paymentAmount,
this.paymentDate,
this.paymentMethodName,
this.paymentReferenceNumber,
this.policyId,
this.policyName,
this.procedureName,
this.projectID,
this.projectName,
this.setupID,
this.sourceType,
this.startTime,
this.status,
this.statusCode,
this.statusDesc,
this.subPolicyNo,
this.userID,
this.serviceID});
PatientShareResponse.fromJson(Map<String, dynamic> json) {
PatientShareResponse.fromJson(Map<dynamic, dynamic> json) {
advanceNumber = json['AdvanceNumber'];
appointmentDate = json['AppointmentDate'];
appointmentNo = json['AppointmentNo'];
@ -110,9 +114,10 @@ class PatientShareResponse {
companyId = json['CompanyId'];
companyName = json['CompanyName'];
companyShareWithTax = json['CompanyShareWithTax'];
doctorID = json['DoctorID'];
doctorImageURL = json['DoctorImageURL'];
doctorNameObj = json['DoctorNameObj'];
doctorSpeciality = json['DoctorSpeciality'].cast<String>();
// doctorSpeciality = json['DoctorSpeciality'].cast<dynamic>();
errCode = json['ErrCode'];
groupID = json['GroupID'];
iSAllowOnlineCheckedIN = json['ISAllowOnlineCheckedIN'];
@ -147,10 +152,11 @@ class PatientShareResponse {
statusDesc = json['StatusDesc'];
subPolicyNo = json['SubPolicyNo'];
userID = json['UserID'];
serviceID = json['ServiceID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
Map<dynamic, dynamic> toJson() {
final Map<dynamic, dynamic> data = new Map<dynamic, dynamic>();
data['AdvanceNumber'] = this.advanceNumber;
data['AppointmentDate'] = this.appointmentDate;
data['AppointmentNo'] = this.appointmentNo;
@ -162,6 +168,7 @@ class PatientShareResponse {
data['CompanyId'] = this.companyId;
data['CompanyName'] = this.companyName;
data['CompanyShareWithTax'] = this.companyShareWithTax;
data['DoctorID'] = this.doctorID;
data['DoctorImageURL'] = this.doctorImageURL;
data['DoctorNameObj'] = this.doctorNameObj;
data['DoctorSpeciality'] = this.doctorSpeciality;
@ -199,6 +206,7 @@ class PatientShareResponse {
data['StatusDesc'] = this.statusDesc;
data['SubPolicyNo'] = this.subPolicyNo;
data['UserID'] = this.userID;
data['ServiceID'] = this.serviceID;
return data;
}
}

@ -0,0 +1,96 @@
class CovidPaymentInfoResponse {
dynamic propertyChanged;
dynamic cashPriceField;
dynamic cashPriceTaxField;
dynamic cashPriceWithTaxField;
dynamic companyIdField;
String companyNameField;
dynamic companyShareWithTaxField;
dynamic errCodeField;
dynamic groupIDField;
dynamic insurancePolicyNoField;
String messageField;
dynamic patientCardIDField;
dynamic patientShareField;
dynamic patientShareWithTaxField;
dynamic patientTaxAmountField;
dynamic policyIdField;
dynamic policyNameField;
String procedureNameField;
dynamic setupIDField;
dynamic statusCodeField;
dynamic subPolicyNoField;
CovidPaymentInfoResponse(
{this.propertyChanged,
this.cashPriceField,
this.cashPriceTaxField,
this.cashPriceWithTaxField,
this.companyIdField,
this.companyNameField,
this.companyShareWithTaxField,
this.errCodeField,
this.groupIDField,
this.insurancePolicyNoField,
this.messageField,
this.patientCardIDField,
this.patientShareField,
this.patientShareWithTaxField,
this.patientTaxAmountField,
this.policyIdField,
this.policyNameField,
this.procedureNameField,
this.setupIDField,
this.statusCodeField,
this.subPolicyNoField});
CovidPaymentInfoResponse.fromJson(Map<String, dynamic> json) {
propertyChanged = json['PropertyChanged'];
cashPriceField = json['cashPriceField'];
cashPriceTaxField = json['cashPriceTaxField'];
cashPriceWithTaxField = json['cashPriceWithTaxField'];
companyIdField = json['companyIdField'];
companyNameField = json['companyNameField'];
companyShareWithTaxField = json['companyShareWithTaxField'];
errCodeField = json['errCodeField'];
groupIDField = json['groupIDField'];
insurancePolicyNoField = json['insurancePolicyNoField'];
messageField = json['messageField'];
patientCardIDField = json['patientCardIDField'];
patientShareField = json['patientShareField'];
patientShareWithTaxField = json['patientShareWithTaxField'];
patientTaxAmountField = json['patientTaxAmountField'];
policyIdField = json['policyIdField'];
policyNameField = json['policyNameField'];
procedureNameField = json['procedureNameField'];
setupIDField = json['setupIDField'];
statusCodeField = json['statusCodeField'];
subPolicyNoField = json['subPolicyNoField'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['PropertyChanged'] = this.propertyChanged;
data['cashPriceField'] = this.cashPriceField;
data['cashPriceTaxField'] = this.cashPriceTaxField;
data['cashPriceWithTaxField'] = this.cashPriceWithTaxField;
data['companyIdField'] = this.companyIdField;
data['companyNameField'] = this.companyNameField;
data['companyShareWithTaxField'] = this.companyShareWithTaxField;
data['errCodeField'] = this.errCodeField;
data['groupIDField'] = this.groupIDField;
data['insurancePolicyNoField'] = this.insurancePolicyNoField;
data['messageField'] = this.messageField;
data['patientCardIDField'] = this.patientCardIDField;
data['patientShareField'] = this.patientShareField;
data['patientShareWithTaxField'] = this.patientShareWithTaxField;
data['patientTaxAmountField'] = this.patientTaxAmountField;
data['policyIdField'] = this.policyIdField;
data['policyNameField'] = this.policyNameField;
data['procedureNameField'] = this.procedureNameField;
data['setupIDField'] = this.setupIDField;
data['statusCodeField'] = this.statusCodeField;
data['subPolicyNoField'] = this.subPolicyNoField;
return data;
}
}

@ -0,0 +1,68 @@
class DriveThroughTestingCenterModel {
int rowID;
int iD;
int projectID;
String setupID;
double longitude;
double latitude;
int numberOfTracks;
bool isActive;
int createdBy;
String createdOn;
dynamic editedBy;
dynamic editedON;
dynamic projectName;
dynamic projectNameN;
DriveThroughTestingCenterModel(
{this.rowID,
this.iD,
this.projectID,
this.setupID,
this.longitude,
this.latitude,
this.numberOfTracks,
this.isActive,
this.createdBy,
this.createdOn,
this.editedBy,
this.editedON,
this.projectName,
this.projectNameN});
DriveThroughTestingCenterModel.fromJson(Map<String, dynamic> json) {
rowID = json['RowID'];
iD = json['ID'];
projectID = json['ProjectID'];
setupID = json['SetupID'];
longitude = json['Longitude'];
latitude = json['Latitude'];
numberOfTracks = json['NumberOfTracks'];
isActive = json['IsActive'];
createdBy = json['CreatedBy'];
createdOn = json['CreatedOn'];
editedBy = json['EditedBy'];
editedON = json['EditedON'];
projectName = json['ProjectName'];
projectNameN = json['ProjectNameN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['RowID'] = this.rowID;
data['ID'] = this.iD;
data['ProjectID'] = this.projectID;
data['SetupID'] = this.setupID;
data['Longitude'] = this.longitude;
data['Latitude'] = this.latitude;
data['NumberOfTracks'] = this.numberOfTracks;
data['IsActive'] = this.isActive;
data['CreatedBy'] = this.createdBy;
data['CreatedOn'] = this.createdOn;
data['EditedBy'] = this.editedBy;
data['EditedON'] = this.editedON;
data['ProjectName'] = this.projectName;
data['ProjectNameN'] = this.projectNameN;
return data;
}
}

@ -0,0 +1,64 @@
class LiveCareScheduleClinicsListResponse {
List<ClinicsHaveScheduleList> clinicsHaveScheduleList;
LiveCareScheduleClinicsListResponse({this.clinicsHaveScheduleList});
LiveCareScheduleClinicsListResponse.fromJson(Map<String, dynamic> json) {
if (json['ClinicsHaveScheduleList'] != null) {
clinicsHaveScheduleList = new List<ClinicsHaveScheduleList>();
json['ClinicsHaveScheduleList'].forEach((v) {
clinicsHaveScheduleList.add(new ClinicsHaveScheduleList.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.clinicsHaveScheduleList != null) {
data['ClinicsHaveScheduleList'] =
this.clinicsHaveScheduleList.map((v) => v.toJson()).toList();
}
return data;
}
}
class ClinicsHaveScheduleList {
int clinicID;
int serviceID;
int projectID;
String clinicDesc;
String clinicDescN;
String projectDesc;
String projectDescN;
ClinicsHaveScheduleList(
{this.clinicID,
this.serviceID,
this.projectID,
this.clinicDesc,
this.clinicDescN,
this.projectDesc,
this.projectDescN});
ClinicsHaveScheduleList.fromJson(Map<String, dynamic> json) {
clinicID = json['ClinicID'];
serviceID = json['ServiceID'];
projectID = json['ProjectID'];
clinicDesc = json['ClinicDesc'];
clinicDescN = json['ClinicDescN'];
projectDesc = json['ProjectDesc'];
projectDescN = json['ProjectDescN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ClinicID'] = this.clinicID;
data['ServiceID'] = this.serviceID;
data['ProjectID'] = this.projectID;
data['ClinicDesc'] = this.clinicDesc;
data['ClinicDescN'] = this.clinicDescN;
data['ProjectDesc'] = this.projectDesc;
data['ProjectDescN'] = this.projectDescN;
return data;
}
}

@ -0,0 +1,92 @@
class insertVIDARequest {
int patientID;
int acceptedBy;
int appointmentNo;
String deviceToken;
double latitude;
double longitude;
int serviceID;
int projectID;
int clinicID;
String deviceType;
String voipToken;
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
int patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
insertVIDARequest(
{this.patientID,
this.acceptedBy,
this.appointmentNo,
this.deviceToken,
this.latitude,
this.longitude,
this.serviceID,
this.projectID,
this.clinicID,
this.deviceType,
this.voipToken,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID});
insertVIDARequest.fromJson(Map<String, dynamic> json) {
patientID = json['PatientID'];
acceptedBy = json['AcceptedBy'];
appointmentNo = json['AppointmentNo'];
deviceToken = json['DeviceToken'];
latitude = json['Latitude'];
longitude = json['Longitude'];
serviceID = json['ServiceID'];
projectID = json['ProjectID'];
clinicID = json['ClinicID'];
deviceType = json['DeviceType'];
voipToken = json['VoipToken'];
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientID'] = this.patientID;
data['AcceptedBy'] = this.acceptedBy;
data['AppointmentNo'] = this.appointmentNo;
data['DeviceToken'] = this.deviceToken;
data['Latitude'] = this.latitude;
data['Longitude'] = this.longitude;
data['ServiceID'] = this.serviceID;
data['ProjectID'] = this.projectID;
data['ClinicID'] = this.clinicID;
data['DeviceType'] = this.deviceType;
data['VoipToken'] = this.voipToken;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
return data;
}
}

@ -5,6 +5,7 @@ class Request {
var ProjectID;
var LanguageID;
var DeviceTypeID;
var DeviceType;
var AppointmentNo;
var IPAdress;
var VersionID;

@ -17,66 +17,63 @@ import 'e_referral_page.dart';
class EReferralIndexPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: "Service Information",
body: SingleChildScrollView(
return AppScaffold(
isShowAppBar: true,
appBarTitle: "Service Information",
body: SingleChildScrollView(
padding: EdgeInsets.all(12),
child:
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
"E-Referral: ",
fontWeight: FontWeight.normal,
fontSize: 25,
color: Hexcolor("#60686b"),
),
SizedBox(
height: 12,
),
Texts(
"This service allows you to submit a Referral request from any health care providers either inside or outside the kingdom of Saudi Arabia to any of HMG Hospitals, By filling some of the patient's data and attaching the medical reports, moreover you can track the request status (Under process, Accepted or Rejected)",
fontWeight: FontWeight.normal,
fontSize: 17,
),
SizedBox(
height: 22,
),
Center(
child: SizedBox(
height: MediaQuery.of(context).size.height * 0.55,
width: MediaQuery.of(context).size.width * 0.50,
child: CarouselSlider(
imagesUrlList: [
"https://hmgwebservices.com/Images/MobileApp/images-info-home/referal/en/0.png",
"https://hmgwebservices.com/Images/MobileApp/images-info-home/referal/en/1.png"
],
),
),
),
SizedBox(
height: 77,
),
],
)
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
onTap: ()=> Navigator.push(context, FadePage(page: EReferralPage())),
label: "E-Referral",
textColor: Theme.of(context).backgroundColor),
Texts(
"E-Referral: ",
fontWeight: FontWeight.normal,
fontSize: 25,
color: HexColor("#60686b"),
),
SizedBox(
height: 12,
),
Texts(
"This service allows you to submit a Referral request from any health care providers either inside or outside the kingdom of Saudi Arabia to any of HMG Hospitals, By filling some of the patient's data and attaching the medical reports, moreover you can track the request status (Under process, Accepted or Rejected)",
fontWeight: FontWeight.normal,
fontSize: 17,
),
SizedBox(
height: 22,
),
Center(
child: SizedBox(
height: MediaQuery.of(context).size.height * 0.55,
width: MediaQuery.of(context).size.width * 0.50,
child: CarouselSlider(
imagesUrlList: [
"https://hmgwebservices.com/Images/MobileApp/images-info-home/referal/en/0.png",
"https://hmgwebservices.com/Images/MobileApp/images-info-home/referal/en/1.png"
],
),
),
),
SizedBox(
height: 77,
),
],
),
));
)),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
onTap: () => Navigator.push(
context, FadePage(page: EReferralPage())),
label: "E-Referral",
textColor: Theme.of(context).backgroundColor),
),
],
),
));
}
}

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_index_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h2o_index_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/%E2%80%8B%20health_calculators.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_converter.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/my_web_view.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.dart';
@ -7,6 +8,7 @@ import 'package:diplomaticquarterapp/pages/Blood/advance_payment_page.dart';
import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/family/my-family.dart';
@ -15,6 +17,7 @@ import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dar
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -39,6 +42,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).alhabiServices,
isShowDecPage: false,
body: Column(
children: [
Expanded(
@ -192,7 +196,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(),
FadePage(page: ChildVaccinesPage()),
),
imageLocation:
'assets/images/new-design/children_vaccines_icon.png',
@ -210,16 +214,15 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
title: TranslationBase.of(context).todoList,
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(),
onTap: () => Navigator.of(context).pushNamed(
SYMPTOM_CHECKER,
),
imageLocation: 'assets/images/new-design/body_icon.png',
title: 'Symptom Checker'),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page:BloodDonationPage()),
FadePage(page: BloodDonationPage()),
),
imageLocation: 'assets/images/new-design/blood_icon.png',
title: 'Blood Donation',
@ -227,7 +230,9 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(),
FadePage(
page: (HealthCalculators()),
),
),
imageLocation:
'assets/images/new-design/health_calculator_icon.png',
@ -285,7 +290,8 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
Navigator.of(context).push(MaterialPageRoute(
builder: (BuildContext context) => MyWebView(
title: "HMG News",
selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
selectedUrl:
"https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
)));
},
imageLocation:

@ -23,7 +23,7 @@ class H2OPageIndexPage extends StatelessWidget {
"Water Tracker:",
fontWeight: FontWeight.normal,
fontSize: 25,
color: Hexcolor("#60686b"),
color: HexColor("#60686b"),
),
SizedBox(
height: 12,

@ -6,10 +6,11 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:percent_indicator/circular_percent_indicator.dart';
class TodayPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return BaseView<H2OViewModel>(
return BaseView<H2OViewModel>(
onModelReady: (model) => model.getUserProgressForTodayData(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
@ -27,11 +28,11 @@ class TodayPage extends StatelessWidget {
animation: true,
animationDuration: 1200,
lineWidth: 15.0,
percent:model.userProgressData ==null ?0.0:
(model.userProgressData.percentageConsumed /
100) >= 1 ? 1 : (model.userProgressData
.percentageConsumed /
100),
percent: model.userProgressData == null
? 0.0
: (model.userProgressData.percentageConsumed / 100) >= 1
? 1
: (model.userProgressData.percentageConsumed / 100),
//,
center: Center(
child: Column(
@ -46,13 +47,16 @@ class TodayPage extends StatelessWidget {
SizedBox(
height: 4,
),
Text(model.userProgressData ==null ?"0.0":
model.userProgressData.quantityConsumed
.toString() + 'ml',
Text(
model.userProgressData == null
? "0.0"
: model.userProgressData.quantityConsumed
.toString() +
'ml',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20.0,
color: Hexcolor("#60BCF9")),
color: HexColor("#60BCF9")),
),
SizedBox(
height: 4,
@ -60,9 +64,7 @@ class TodayPage extends StatelessWidget {
SizedBox(
height: 5,
width: 50,
child: Container(
),
child: Container(),
),
SizedBox(
height: 4,
@ -74,23 +76,28 @@ class TodayPage extends StatelessWidget {
SizedBox(
height: 4,
),
Text(model.userProgressData ==null ?"0.0":
(model.userProgressData.quantityLimit -
model.userProgressData
.quantityConsumed) < 0 ? "0 ml" :
(model.userProgressData.quantityLimit -
model.userProgressData
.quantityConsumed).toString() + ' ml',
Text(
model.userProgressData == null
? "0.0"
: (model.userProgressData.quantityLimit -
model.userProgressData
.quantityConsumed) <
0
? "0 ml"
: (model.userProgressData.quantityLimit -
model.userProgressData
.quantityConsumed)
.toString() +
' ml',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18.0),
fontWeight: FontWeight.bold, fontSize: 18.0),
),
],
),
),
circularStrokeCap: CircularStrokeCap.butt,
backgroundColor: Hexcolor("#D1E3F6"),
progressColor: Hexcolor("#60BCF9"),
backgroundColor: HexColor("#D1E3F6"),
progressColor: HexColor("#60BCF9"),
),
),
Row(
@ -105,9 +112,9 @@ class TodayPage extends StatelessWidget {
height: 30,
width: 70,
decoration: BoxDecoration(
color: Hexcolor("#D1E3F6"),
borderRadius: BorderRadius.all(
Radius.circular(30))),
color: HexColor("#D1E3F6"),
borderRadius:
BorderRadius.all(Radius.circular(30))),
),
),
Text(
@ -125,9 +132,9 @@ class TodayPage extends StatelessWidget {
height: 30,
width: 70,
decoration: BoxDecoration(
color: Hexcolor("#60BCF9"),
borderRadius: BorderRadius.all(
Radius.circular(30))),
color: HexColor("#60BCF9"),
borderRadius:
BorderRadius.all(Radius.circular(30))),
),
),
Text(
@ -143,10 +150,7 @@ class TodayPage extends StatelessWidget {
),
SizedBox(
height: 0.5,
width: MediaQuery
.of(context)
.size
.width,
width: MediaQuery.of(context).size.width,
child: Container(
color: Colors.grey,
),
@ -163,4 +167,3 @@ class TodayPage extends StatelessWidget {
);
}
}

@ -0,0 +1,522 @@
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/material.dart';
import 'package:flutter/services.dart';
import 'dart:math';
import 'result_page.dart';
const activeCardColor = Color(0xff70777A);
const inactiveCardColor = Color(0xffFAFAFd);
class BMICalculator extends StatefulWidget {
@override
_BMICalculatorState createState() => _BMICalculatorState();
}
class _BMICalculatorState extends State<BMICalculator> {
TextEditingController textController = new TextEditingController();
String textResult;
String msg;
double bmiResult;
int height = 150;
int weight = 40;
Color cmCard = activeCardColor;
Color ftCard = inactiveCardColor;
Color lbCard = inactiveCardColor;
Color kgCard = activeCardColor;
void updateColor(int type) {
//MG/DLT card
if (type == 1) {
if (cmCard == inactiveCardColor) {
cmCard = activeCardColor;
ftCard = inactiveCardColor;
} else {
cmCard = inactiveCardColor;
}
}
if (type == 2) {
if (ftCard == inactiveCardColor) {
ftCard = activeCardColor;
cmCard = inactiveCardColor;
} else {
ftCard = inactiveCardColor;
}
}
}
void updateColorWeight(int type) {
//MG/DLT card
if (type == 1) {
if (kgCard == inactiveCardColor) {
kgCard = activeCardColor;
lbCard = inactiveCardColor;
} else {
kgCard = inactiveCardColor;
}
}
if (type == 2) {
if (lbCard == inactiveCardColor) {
lbCard = activeCardColor;
kgCard = inactiveCardColor;
} else {
lbCard = inactiveCardColor;
}
}
}
double convertToCm(double number) {
return number * 30.48;
}
double convertToKg(double number) {
return number / 2.205;
}
double calculateBMI() {
if (ftCard == activeCardColor) {
convertToCm(height.toDouble());
}
bmiResult = weight / pow(height / 100, 2);
return bmiResult;
}
void showTextResult() {
if (bmiResult >= 30) {
textResult = 'Obese';
} else if (bmiResult < 30 && bmiResult >= 25) {
textResult = 'OverWeight';
} else if (bmiResult < 25 && bmiResult >= 18.5) {
textResult = 'Healthy';
} else if (bmiResult < 18.5) {
textResult = 'UnderWeight';
}
}
void showMsg() {
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.';
} 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 ';
} 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.';
} 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.';
}
}
@override
void initState() {
super.initState();
textController.text = '0'; // Setting the initial value for the field.
}
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: 'BMI Calculator',
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Center(
child: Container(
width: 350.0,
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',
style: TextStyle(fontSize: 18.0),
),
),
),
),
Container(
height: 200.0,
width: 350.0,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
),
child: Column(
children: [
Row(
children: [
Padding(
padding: EdgeInsets.all(8.0),
child: Texts('Height'),
),
],
),
Row(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
foregroundDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(5.0),
border: Border.all(
color: Colors.blueGrey,
width: 2.0,
),
),
child: Row(
children: <Widget>[
Expanded(
child: Center(
child: Text(height.toString()),
),
),
Container(
height: 38.0,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: 0.5,
),
),
),
child: InkWell(
child: Icon(
Icons.arrow_drop_up,
size: 18.0,
),
onTap: () {
setState(() {
if (height < 250) height++;
});
},
),
),
InkWell(
child: Icon(
Icons.arrow_drop_down,
size: 18.0,
),
onTap: () {
setState(() {
if (height > 120) height--;
});
},
),
],
),
),
],
),
),
),
),
Slider(
value: height.toDouble(),
min: 120,
max: 250,
onChanged: (double newValue) {
setState(() {
height = newValue.round();
});
},
activeColor: Color(0xffC5272D),
inactiveColor: Color(0xffF3C5C6),
),
],
),
Row(
children: [
Padding(
padding: EdgeInsets.all(8.0),
child: Texts('Select Unit'),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
GestureDetector(
onTap: () {
setState(() {
updateColor(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')),
),
),
),
GestureDetector(
onTap: () {
setState(() {
updateColor(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
),
],
),
child: Padding(
padding:
const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts('FT')),
),
),
),
],
),
],
),
),
SizedBox(
height: 25.0,
),
Container(
height: 200.0,
width: 350.0,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
),
child: Column(
children: [
Row(
children: [
Padding(
padding: EdgeInsets.all(8.0),
child: Texts('Weight'),
),
],
),
Row(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
foregroundDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(5.0),
border: Border.all(
color: Colors.blueGrey,
width: 2.0,
),
),
child: Row(
children: <Widget>[
Expanded(
child: Center(
child: Text(weight.toString()),
),
),
Container(
height: 38.0,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: 0.5,
),
),
),
child: InkWell(
child: Icon(
Icons.arrow_drop_up,
size: 18.0,
),
onTap: () {
setState(() {
if (weight < 250) weight++;
});
},
),
),
InkWell(
child: Icon(
Icons.arrow_drop_down,
size: 18.0,
),
onTap: () {
setState(() {
if (weight > 40) weight--;
});
},
),
],
),
),
],
),
),
),
),
Slider(
value: weight.toDouble(),
min: 40,
max: 250,
onChanged: (double newValue) {
setState(() {
weight = newValue.round();
});
},
activeColor: Color(0xffC5272D),
inactiveColor: Color(0xffF3C5C6),
),
],
),
Row(
children: [
Padding(
padding: EdgeInsets.all(8.0),
child: Texts('Select Unit'),
),
],
),
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
),
],
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
),
],
),
child: Padding(
padding:
const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts('LB')),
),
),
),
],
),
],
),
),
SizedBox(
height: 25.0,
),
Container(
height: 100.0,
width: 350.0,
child: Button(
label: 'CALCULATE',
onTap: () {
setState(() {
calculateBMI();
showTextResult();
showMsg();
{
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ResultPage(
finalResult: bmiResult,
textResult: textResult,
msg: msg,
)),
);
}
});
},
),
),
],
),
),
);
}
}

@ -0,0 +1,101 @@
import 'dart:ffi';
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/material.dart';
import 'package:percent_indicator/percent_indicator.dart';
class ResultPage extends StatelessWidget {
final double finalResult;
final String textResult;
final String msg;
ResultPage({this.finalResult, this.textResult, this.msg});
Color inductorColor;
double percent;
Color colorInductor() {
if (finalResult >= 30) {
inductorColor = Color(0xffC70D00);
} else if (finalResult < 30 && finalResult >= 25) {
inductorColor = Color(0xffC25400);
} else if (finalResult < 25 && finalResult >= 18.5) {
inductorColor = Color(0xff36D600);
} else if (finalResult < 18.5) {
inductorColor = Color(0xff1BE0EE);
}
return inductorColor;
}
double percentInductor() {
if (finalResult >= 30) {
percent = 1.0;
} else if (finalResult < 30 && finalResult >= 25) {
percent = 0.73;
} else if (finalResult < 25 && finalResult >= 18.5) {
percent = 0.5;
} else if (finalResult < 18.5) {
percent = 0.25;
}
return percent;
}
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: "BMI Calculator",
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,
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,
),
),
Container(
height: 120,
width: 280.0,
child: Texts(msg),
),
Container(
width: 350,
child: Button(
label: 'See List Of Doctors',
),
),
],
),
);
}
}

@ -0,0 +1,722 @@
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/material.dart';
import 'dart:math';
import 'bmr_result_page.dart';
const activeCardColorGender = Color(0xffC5272D);
const inactiveCardColorGender = Color(0xffFAFAFd);
const activeCardColor = Color(0xff70777A);
const inactiveCardColor = Color(0xffFAFAFd);
class BmrCalculator extends StatefulWidget {
@override
_BmrCalculatorState createState() => _BmrCalculatorState();
}
class _BmrCalculatorState extends State<BmrCalculator> {
bool isMale = false;
bool isHeightCm = true;
Color maleCard = activeCardColorGender;
Color femaleCard = inactiveCardColorGender;
Color kgCard = activeCardColor;
Color lbCard = inactiveCardColor;
Color cmCard = activeCardColor;
Color ftCard = inactiveCardColor;
int age = 0;
int height = 0;
int weight = 0;
double bmrResult = 0;
String dropdownValue = 'Lighty Active (1-3) days per week';
double calories = 0;
void updateColor(int type) {
//MG/DLT card
if (type == 1) {
if (maleCard == inactiveCardColorGender) {
maleCard = activeCardColorGender;
femaleCard = inactiveCardColorGender;
} else {
maleCard = inactiveCardColorGender;
}
}
if (type == 2) {
if (femaleCard == inactiveCardColorGender) {
femaleCard = activeCardColorGender;
maleCard = inactiveCardColorGender;
} else {
femaleCard = inactiveCardColorGender;
}
}
}
void updateColorHeight(int type) {
//MG/DLT card
if (type == 1) {
if (cmCard == inactiveCardColor) {
cmCard = activeCardColor;
ftCard = inactiveCardColor;
} else {
cmCard = inactiveCardColor;
}
}
if (type == 2) {
if (ftCard == inactiveCardColor) {
ftCard = activeCardColor;
cmCard = inactiveCardColor;
} else {
ftCard = inactiveCardColor;
}
}
}
void updateColorWeight(int type) {
//MG/DLT card
if (type == 1) {
if (kgCard == inactiveCardColor) {
kgCard = activeCardColor;
lbCard = inactiveCardColor;
} else {
kgCard = inactiveCardColor;
}
}
if (type == 2) {
if (lbCard == inactiveCardColor) {
lbCard = activeCardColor;
kgCard = inactiveCardColor;
} else {
lbCard = inactiveCardColor;
}
}
}
void calculateBmr() {
if (isMale == true) {
bmrResult = 66.5 + (13.75 * weight) + (5.003 * height) - (6.755 * age);
} else if (isMale == false) {
bmrResult =
655.0955 + (9.5634 * weight) + (1.850 * height) - (4.676 * age);
}
bmrResult = bmrResult.roundToDouble();
}
void calculateCalories() {
if (dropdownValue == "Almost Inactive(Little or no exercises)") {
calories = bmrResult * 1.2;
} else if (dropdownValue == "Lighty Active (1-3) days per week") {
calories = bmrResult * 1.375;
} else if (dropdownValue == "very Active(6-7) days per week") {
calories = bmrResult * 1.55;
} else if (dropdownValue == "Super Active(very hard exercises)") {
calories = bmrResult * 1.725;
} else if (dropdownValue == "") {
calories = bmrResult * 10.725;
}
}
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: 'Bmr Calculator',
body: Padding(
padding: EdgeInsets.symmetric(horizontal: 25.0, vertical: 15.0),
child: SingleChildScrollView(
child: Container(
height: 850,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.all(10.0),
child: Texts(
'Calculates the amount of energy that the persons body expends in a day'),
),
Divider(
thickness: 2.0,
),
SizedBox(
height: 5.0,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Gender'),
SizedBox(
height: 5.0,
),
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),
),
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),
),
child: Center(child: Texts('MALE')),
),
),
],
),
),
SizedBox(
height: 5.0,
),
Texts(
'The Age ( 11 - 120 ) yrs',
),
SizedBox(
height: 10.0,
),
Row(
children: [
Container(
width: 340.0,
height: 60.0,
decoration: BoxDecoration(
color: Colors.white,
),
child: Row(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
foregroundDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(5.0),
border: Border.all(
color: Colors.blueGrey,
width: 2.0,
),
),
child: Row(
children: <Widget>[
Expanded(
child: Center(
child: Text(age.toString()),
),
),
Container(
height: 38.0,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: 0.5,
),
),
),
child: InkWell(
child: Icon(
Icons.arrow_drop_up,
size: 18.0,
),
onTap: () {
setState(() {
if (age < 120) age++;
});
},
),
),
InkWell(
child: Icon(
Icons.arrow_drop_down,
size: 18.0,
),
onTap: () {
setState(() {
if (age > 0) age--;
});
},
),
],
),
),
],
),
),
),
),
Expanded(
child: Slider(
value: age.toDouble(),
min: 0,
max: 120,
onChanged: (double newValue) {
setState(() {
age = newValue.round();
});
},
activeColor: Color(0xffC5272D),
inactiveColor: Color(0xffF3C5C6),
),
),
],
),
),
],
),
Texts(
'Height',
),
Row(
children: [
Container(
width: 340.0,
height: 60.0,
decoration: BoxDecoration(
color: Colors.white,
),
child: Row(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
foregroundDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(5.0),
border: Border.all(
color: Colors.blueGrey,
width: 2.0,
),
),
child: Row(
children: <Widget>[
Expanded(
child: Center(
child: Text(height.toString()),
),
),
Container(
height: 38.0,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: 0.5,
),
),
),
child: InkWell(
child: Icon(
Icons.arrow_drop_up,
size: 18.0,
),
onTap: () {
setState(() {
if (height < 250)
height++;
});
},
),
),
InkWell(
child: Icon(
Icons.arrow_drop_down,
size: 18.0,
),
onTap: () {
setState(() {
if (height > 0) height--;
});
},
),
],
),
),
],
),
),
),
),
Expanded(
child: Slider(
value: height.toDouble(),
min: 0,
max: 250,
onChanged: (double newValue) {
setState(() {
height = newValue.round();
});
},
activeColor: Color(0xffC5272D),
inactiveColor: Color(0xffF3C5C6),
),
),
],
),
),
],
),
Texts('Select Unit'),
SizedBox(
height: 5.0,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
GestureDetector(
onTap: () {
setState(() {
updateColorHeight(1);
isHeightCm = true;
});
},
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')),
),
),
),
GestureDetector(
onTap: () {
setState(() {
updateColorHeight(2);
isHeightCm = false;
});
},
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
),
],
),
child: Padding(
padding:
const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts('Ft')),
),
),
),
],
),
SizedBox(
height: 5.0,
),
Texts(
'Weight',
),
SizedBox(
height: 5.0,
),
Row(
children: [
Container(
width: 340.0,
height: 60.0,
decoration: BoxDecoration(
color: Colors.white,
),
child: Row(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
foregroundDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(5.0),
border: Border.all(
color: Colors.blueGrey,
width: 2.0,
),
),
child: Row(
children: <Widget>[
Expanded(
child: Center(
child: Text(weight.toString()),
),
),
Container(
height: 38.0,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: 0.5,
),
),
),
child: InkWell(
child: Icon(
Icons.arrow_drop_up,
size: 18.0,
),
onTap: () {
setState(() {
if (weight < 250)
weight++;
});
},
),
),
InkWell(
child: Icon(
Icons.arrow_drop_down,
size: 18.0,
),
onTap: () {
setState(() {
if (weight > 0) weight--;
});
},
),
],
),
),
],
),
),
),
),
Expanded(
child: Slider(
value: weight.toDouble(),
min: 0,
max: 250,
onChanged: (double newValue) {
setState(() {
weight = newValue.round();
});
},
activeColor: Color(0xffC5272D),
inactiveColor: Color(0xffF3C5C6),
),
),
],
),
),
],
),
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
),
],
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
),
],
),
child: Padding(
padding:
const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts('LB')),
),
),
),
],
),
SizedBox(
height: 45.0,
),
Divider(
thickness: 2.0,
),
SizedBox(
height: 5.0,
),
Texts('Activity level'),
Container(
width: 300,
child: DropdownButton<String>(
value: dropdownValue,
icon: Icon(Icons.arrow_downward),
iconSize: 24,
elevation: 16,
style: TextStyle(color: Colors.black87),
underline: Container(
height: 2,
color: Colors.black54,
),
onChanged: (String newValue) {
setState(() {
dropdownValue = newValue;
});
},
items: <String>[
'Almost Inactive(Little or no exercises)',
'Lighty Active (1-3) days per week',
'very Active(6-7) days per week',
'Super Active(very hard exercises)'
].map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(
value: value,
child: Text(value),
);
}).toList(),
),
),
SizedBox(
height: 30.0,
),
Container(
height: 100.0,
width: 350.0,
child: Button(
label: 'CALCULATE',
onTap: () {
setState(() {
calculateBmr();
calculateCalories();
{
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => BmrResultPage(
bmrResult: bmrResult,
calories: calories,
)),
);
}
});
},
),
),
],
),
],
),
),
),
),
);
}
}

@ -0,0 +1,65 @@
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/material.dart';
import 'package:percent_indicator/circular_percent_indicator.dart';
class BmrResultPage extends StatelessWidget {
final double bmrResult;
final double calories;
BmrResultPage({this.bmrResult, this.calories});
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: 'BMR Calculator',
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Center(
child: CircularPercentIndicator(
radius: 220.0,
lineWidth: 20.0,
percent: ((this.bmrResult > 3500) ? 100 : this.bmrResult / 3500),
center: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
bmrResult.toStringAsFixed(1),
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.bold,
),
),
SizedBox(
height: 5.0,
),
Text(
'Calories/Day',
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.w600,
),
),
],
),
progressColor: Color(0xff3C3939),
),
),
Container(
height: 120,
width: 280.0,
child: Texts(
'This means the body will burn ( ${bmrResult.toStringAsFixed(1)} ) calories each day, if engaged in no activity for the entire day.. Note: Daily calorie requirement is ( ${calories.toStringAsFixed(1)} ) calories, to maintain the current weight.'),
),
Container(
width: 350,
child: Button(
label: 'See List Of Doctors',
),
),
],
),
);
}
}

@ -0,0 +1,77 @@
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/material.dart';
import 'package:percent_indicator/circular_percent_indicator.dart';
class FatResult extends StatelessWidget {
final double bodyFat;
final double fat;
final String textResult;
FatResult({this.bodyFat, this.fat, this.textResult = ''});
Color inductorColor;
Color colorInductor() {
if (bodyFat >= 17) {
inductorColor = Color(0xffC70D00);
} else if (bodyFat < 20 && bodyFat >= 24) {
inductorColor = Color(0xffC25400);
} else if (bodyFat < 24 && bodyFat >= 31) {
inductorColor = Color(0xff36D600);
} else if (bodyFat > 45) {
inductorColor = Color(0xff1BE0EE);
}
return inductorColor;
}
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: 'Body Fat',
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
SizedBox(
// height: 40.0,
),
Center(
child: CircularPercentIndicator(
radius: 220.0,
lineWidth: 20.0,
percent: ((fat > 70) ? 100 : fat / 100),
center: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
fat.toStringAsFixed(1) + '%',
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.bold,
),
),
SizedBox(
height: 5.0,
),
],
),
progressColor: inductorColor,
backgroundColor: Colors.white,
),
),
Container(
height: 120,
width: 280.0,
child: Texts(textResult),
),
Container(
width: 350,
child: Button(
label: 'See List Of Doctors',
),
),
],
),
);
}
}

@ -0,0 +1,677 @@
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/material.dart';
import 'calorie_result_page.dart';
const activeCardColorGender = Color(0xffC5272D);
const inactiveCardColorGender = Color(0xffFAFAFd);
const activeCardColor = Color(0xff70777A);
const inactiveCardColor = Color(0xffFAFAFd);
class CalorieCalculator extends StatefulWidget {
@override
_CalorieCalculatorState createState() => _CalorieCalculatorState();
}
class _CalorieCalculatorState extends State<CalorieCalculator> {
bool isMale = false;
Color maleCard = activeCardColorGender;
Color femaleCard = inactiveCardColorGender;
Color kgCard = activeCardColor;
Color lbCard = inactiveCardColor;
Color cmCard = activeCardColor;
Color ftCard = inactiveCardColor;
int age = 0;
int height = 0;
int weight = 0;
double calories;
String dropdownValue;
void updateColor(int type) {
//MG/DLT card
if (type == 1) {
if (maleCard == inactiveCardColorGender) {
maleCard = activeCardColorGender;
femaleCard = inactiveCardColorGender;
} else {
maleCard = inactiveCardColorGender;
}
}
if (type == 2) {
if (femaleCard == inactiveCardColorGender) {
femaleCard = activeCardColorGender;
maleCard = inactiveCardColorGender;
} else {
femaleCard = inactiveCardColorGender;
}
}
}
void updateColorWeight(int type) {
//MG/DLT card
if (type == 1) {
if (kgCard == inactiveCardColor) {
kgCard = activeCardColor;
lbCard = inactiveCardColor;
} else {
kgCard = inactiveCardColor;
}
}
if (type == 2) {
if (lbCard == inactiveCardColor) {
lbCard = activeCardColor;
kgCard = inactiveCardColor;
} else {
lbCard = inactiveCardColor;
}
}
}
void updateColorHeight(int type) {
//MG/DLT card
if (type == 1) {
if (cmCard == inactiveCardColor) {
cmCard = activeCardColor;
ftCard = inactiveCardColor;
} else {
cmCard = inactiveCardColor;
}
}
if (type == 2) {
if (ftCard == inactiveCardColor) {
ftCard = activeCardColor;
cmCard = inactiveCardColor;
} else {
ftCard = inactiveCardColor;
}
}
}
void calculateCalories() {
if (isMale == true) {
calories = 66.5 + (13.75 * weight) + (5.003 * height) - (6.755 * age);
} else if (isMale == false) {
calories =
655.0955 + (9.5634 * weight) + (1.850 * height) - (4.676 * age);
}
}
@override
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),
),
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),
),
child: Center(child: Texts('MALE')),
),
),
],
),
),
SizedBox(
height: 15.0,
),
Texts(
'The Age ( 11 - 120 ) yrs',
),
SizedBox(
height: 10.0,
),
Row(
children: [
Container(
width: 340.0,
height: 60.0,
decoration: BoxDecoration(
color: Colors.white,
),
child: Row(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
foregroundDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(5.0),
border: Border.all(
color: Colors.blueGrey,
width: 2.0,
),
),
child: Row(
children: <Widget>[
Expanded(
child: Center(
child: Text(age.toString()),
),
),
Container(
height: 38.0,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: 0.5,
),
),
),
child: InkWell(
child: Icon(
Icons.arrow_drop_up,
size: 18.0,
),
onTap: () {
setState(() {
if (age < 120) age++;
});
},
),
),
InkWell(
child: Icon(
Icons.arrow_drop_down,
size: 18.0,
),
onTap: () {
setState(() {
if (age > 0) age--;
});
},
),
],
),
),
],
),
),
),
),
Expanded(
child: Slider(
value: age.toDouble(),
min: 0,
max: 120,
onChanged: (double newValue) {
setState(() {
age = newValue.round();
});
},
activeColor: Color(0xffC5272D),
inactiveColor: Color(0xffF3C5C6),
),
),
],
),
),
],
),
Texts(
'Height',
),
Row(
children: [
Container(
width: 340.0,
height: 60.0,
decoration: BoxDecoration(
color: Colors.white,
),
child: Row(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
foregroundDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(5.0),
border: Border.all(
color: Colors.blueGrey,
width: 2.0,
),
),
child: Row(
children: <Widget>[
Expanded(
child: Center(
child: Text(height.toString()),
),
),
Container(
height: 38.0,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: 0.5,
),
),
),
child: InkWell(
child: Icon(
Icons.arrow_drop_up,
size: 18.0,
),
onTap: () {
setState(() {
if (height < 250) height++;
});
},
),
),
InkWell(
child: Icon(
Icons.arrow_drop_down,
size: 18.0,
),
onTap: () {
setState(() {
if (height > 0) height--;
});
},
),
],
),
),
],
),
),
),
),
Expanded(
child: Slider(
value: height.toDouble(),
min: 0,
max: 250,
onChanged: (double newValue) {
setState(() {
height = newValue.round();
});
},
activeColor: Color(0xffC5272D),
inactiveColor: Color(0xffF3C5C6),
),
),
],
),
),
],
),
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')),
),
),
),
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
),
],
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts('Ft')),
),
),
),
],
),
SizedBox(
height: 5.0,
),
Texts(
'Weight',
),
Row(
children: [
Container(
width: 340.0,
height: 60.0,
decoration: BoxDecoration(
color: Colors.white,
),
child: Row(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
foregroundDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(5.0),
border: Border.all(
color: Colors.blueGrey,
width: 2.0,
),
),
child: Row(
children: <Widget>[
Expanded(
child: Center(
child: Text(weight.toString()),
),
),
Container(
height: 38.0,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: 0.5,
),
),
),
child: InkWell(
child: Icon(
Icons.arrow_drop_up,
size: 18.0,
),
onTap: () {
setState(() {
if (weight < 250) weight++;
});
},
),
),
InkWell(
child: Icon(
Icons.arrow_drop_down,
size: 18.0,
),
onTap: () {
setState(() {
if (weight > 0) weight--;
});
},
),
],
),
),
],
),
),
),
),
Expanded(
child: Slider(
value: weight.toDouble(),
min: 0,
max: 250,
onChanged: (double newValue) {
setState(() {
weight = newValue.round();
});
},
activeColor: Color(0xffC5272D),
inactiveColor: Color(0xffF3C5C6),
),
),
],
),
),
],
),
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
),
],
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
),
],
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts('LB')),
),
),
),
],
),
SizedBox(
height: 5.0,
),
Texts('Activity level'),
Container(
width: 300,
child: DropdownButton<String>(
value: dropdownValue,
icon: Icon(Icons.arrow_downward),
iconSize: 24,
elevation: 16,
style: TextStyle(color: Colors.black87),
underline: Container(
height: 2,
color: Colors.black54,
),
onChanged: (String newValue) {
setState(() {
dropdownValue = newValue;
});
},
items: <String>[
'Almost Inactive(Little or no exercises)',
'Lighty Active (1-3) days per week',
'very Active(6-7) days per week',
'Super Active(very hard exercises)'
].map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(
value: value,
child: Text(value),
);
}).toList(),
),
),
SizedBox(
height: 25.0,
),
Container(
height: 100.0,
width: 350.0,
child: Button(
label: 'CALCULATE',
onTap: () {
setState(() {
calculateCalories();
print(calories);
{
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => CalorieResultPage(
calorie: calories,
)),
);
}
});
},
),
),
],
),
),
),
),
);
}
}

@ -0,0 +1,59 @@
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/material.dart';
import 'package:percent_indicator/circular_percent_indicator.dart';
class CalorieResultPage extends StatelessWidget {
final double calorie;
CalorieResultPage({this.calorie});
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: 'Calorie Calculator',
isShowAppBar: true,
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Center(
child: CircularPercentIndicator(
radius: 220.0,
lineWidth: 20.0,
percent: ((this.calorie > 3500) ? 100 : this.calorie / 3500),
center: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
calorie.toStringAsFixed(1),
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.bold,
),
),
SizedBox(
height: 5.0,
),
Texts('Calories'),
],
),
progressColor: Color(0xff3C3939),
backgroundColor: Colors.white,
),
),
Container(
child:
Texts('Daily intake is ${calorie.toStringAsFixed(1)} calories'),
),
Container(
width: 350,
child: Button(
label: 'See List Of Doctors',
),
),
],
),
);
}
}

@ -0,0 +1,367 @@
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/material.dart';
import 'dart:math';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart';
import 'package:flutter/services.dart';
import 'carbs_result_page.dart';
class Carbs extends StatefulWidget {
@override
_CarbsState createState() => _CarbsState();
}
class _CarbsState extends State<Carbs> {
TextEditingController textController = new TextEditingController();
int calories;
String dropdownValue;
bool _visible = false;
int meals;
int protein;
int carbs;
int fat;
double pCal;
double cCal;
double fCal;
double pCalGram;
double cCalGram;
double fCalGram;
double pCalMeal;
double cCalMeal;
double fCalMeal;
void calculateDietRatios() {
if (dropdownValue == 'Very Low Carb') {
meals = 3;
protein = 45;
carbs = 10;
fat = 45;
} else if (dropdownValue == 'Low Carb') {
meals = 3;
protein = 40;
carbs = 30;
fat = 30;
} else if (dropdownValue == 'Moderate Carb') {
meals = 3;
protein = 25;
carbs = 50;
fat = 25;
} else if (dropdownValue == 'USDA Gudilines') {
meals = 3;
protein = 15;
carbs = 55;
fat = 30;
} else if (dropdownValue == 'Zone Diet') {
meals = 3;
protein = 30;
carbs = 40;
fat = 30;
}
}
void calculate() {
pCal = (protein / 100.0) * int.parse(textController.text).ceil();
cCal = (carbs / 100.0) * int.parse(textController.text);
;
fCal = (fat / 100) * int.parse(textController.text);
;
pCalGram = pCal / 4.0;
cCalGram = cCal / 4.0;
fCalGram = fCal / 9.0;
pCalMeal = pCalGram / meals.ceil();
cCalMeal = cCalGram / meals.ceil();
fCalMeal = fCalGram / meals.ceil();
}
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: 'Carb Protein Fat',
body: Padding(
padding: EdgeInsets.symmetric(horizontal: 25.0, vertical: 15.0),
child: SingleChildScrollView(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
'Calculates carbohydrate protein and fat\n ratio in calories and grams according to a\n pre-set ratio',
),
SizedBox(
height: 15.0,
),
Column(
children: [
Container(
width: 340.0,
height: 60.0,
decoration: BoxDecoration(
color: Colors.white,
),
child: Row(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 300.0,
foregroundDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(5.0),
border: Border.all(
color: Colors.blueGrey,
width: 2.0,
),
),
child: Row(
children: <Widget>[
Expanded(
child: Center(
child: TextFormField(
controller: textController,
inputFormatters: <TextInputFormatter>[
FilteringTextInputFormatter
.digitsOnly
],
keyboardType: TextInputType.number,
decoration: InputDecoration(
hintText: " The Calories per day ",
labelStyle: TextStyle(
color: Colors.black87,
),
),
),
),
),
Container(
height: 38.0,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: 0.5,
),
),
),
child: InkWell(
child: Icon(
Icons.arrow_drop_up,
size: 18.0,
),
onTap: () {
setState(() {
int currentValue = int.parse(
textController.text);
currentValue++;
textController.text =
(currentValue).toString();
});
},
),
),
InkWell(
child: Icon(
Icons.arrow_drop_down,
size: 18.0,
),
onTap: () {
setState(() {
int currentValue = int.parse(
textController.text);
currentValue--;
textController.text =
(currentValue).toString();
});
},
),
],
),
),
],
),
),
),
),
],
),
),
SizedBox(
height: 20.0,
),
Button(
backgroundColor: Color(0xffC5272D),
label: 'NOT SURE? CLICK HERE ',
onTap: () {
setState(() {
{
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => CalorieCalculator()),
);
}
});
},
),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Select Diet Type'),
Container(
width: 400,
child: DropdownButton<String>(
value: dropdownValue,
icon: Icon(Icons.arrow_downward),
iconSize: 24,
elevation: 16,
style: TextStyle(color: Colors.black87),
underline: Container(
height: 2,
color: Colors.black54,
),
onChanged: (String newValue) {
setState(() {
dropdownValue = newValue;
calculateDietRatios();
dropdownValue == null
? _visible = false
: _visible = true;
});
},
items: <String>[
'Very Low Carb',
'Low Carb',
'Moderate Carb',
'USDA Gudilines',
'Zone Diet',
].map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(
value: value,
child: Text(value),
);
}).toList(),
),
),
Visibility(
visible: _visible,
child: Container(
height: 170.0,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Texts(
'Ratios are divided according to the selected diet'),
RichText(
text: TextSpan(
style: TextStyle(color: Colors.black),
children: [
TextSpan(text: 'Meals Per Day '),
TextSpan(
text: '$meals',
style: TextStyle(color: Color(0xffC5272D)),
),
],
),
),
RichText(
text: TextSpan(
style: TextStyle(color: Colors.black),
children: [
TextSpan(
text: 'Protein ',
),
TextSpan(
text: '$protein%',
style: TextStyle(color: Color(0xffC5272D)),
)
],
),
),
RichText(
text: TextSpan(
style: TextStyle(color: Colors.black),
children: [
TextSpan(
text: 'Carbohydrate ',
),
TextSpan(
text: '$carbs%',
style: TextStyle(color: Color(0xffC5272D)),
)
],
),
),
RichText(
text: TextSpan(
style: TextStyle(color: Colors.black),
children: [
TextSpan(
text: 'Fat ',
),
TextSpan(
text: '$fat%',
style: TextStyle(color: Color(0xffC5272D)),
)
],
),
),
],
),
),
)
],
),
SizedBox(
height: 55.0,
),
Container(
height: 100.0,
width: 350.0,
child: Button(
label: 'CALCULATE',
onTap: () {
setState(() {
{
calculate();
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => CarbsResult(
cCal: cCal,
pCal: pCal,
fCal: fCal,
pCalGram: pCalGram,
pCalMeal: pCalMeal,
fCalGram: fCalGram,
fCalMeal: fCalMeal,
cCalGram: cCalGram,
cCalMeal: cCalMeal,
)),
);
}
});
},
),
),
],
),
),
),
),
);
}
}

@ -0,0 +1,175 @@
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/material.dart';
import 'dart:math';
import 'package:flutter/painting.dart';
class CarbsResult extends StatelessWidget {
double pCal;
double cCal;
double fCal;
double pCalGram;
double cCalGram;
double fCalGram;
double pCalMeal;
double cCalMeal;
double fCalMeal;
CarbsResult(
{this.pCal,
this.cCal,
this.fCal,
this.pCalGram,
this.cCalGram,
this.fCalGram,
this.fCalMeal,
this.cCalMeal,
this.pCalMeal});
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: 'Carb Protein Fat',
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Padding(
padding: EdgeInsets.symmetric(vertical: 30.0, horizontal: 10.0),
child: Table(
border: TableBorder(
verticalInside: BorderSide(width: 1, color: Colors.black54),
bottom: BorderSide(width: 1, color: Colors.black54),
left: BorderSide(width: 1, color: Colors.black54),
right: BorderSide(width: 1, color: Colors.black54),
top: BorderSide(width: 1, color: Colors.black54),
),
children: [
TableRow(
decoration: BoxDecoration(
color: Colors.white,
),
children: [
TableCell(
child: Center(
child: Texts('Description'),
),
),
TableCell(
child: Center(
child: Texts('Protein'),
),
),
TableCell(
child: Center(
child: Texts(
'Carbohydrate',
),
),
),
TableCell(
child: Center(
child: Texts('Fat'),
),
),
]),
TableRow(children: [
Padding(
padding: EdgeInsets.all(8.0),
child: TableCell(
child: Center(
child: Texts('Calories\n Per Day'),
),
),
),
TableCell(
child: Center(
child: Texts(pCal.ceil().toString() + ' Cals'),
),
),
TableCell(
child: Center(
child: Texts(cCal.ceil().toString() + ' Cals'),
),
),
TableCell(
child: Center(
child: Texts(fCal.ceil().toString() + ' Cals'),
),
),
]),
TableRow(children: [
Padding(
padding: EdgeInsets.all(8.0),
child: TableCell(
child: Center(
child: Texts('Grams Per\n Day'),
),
),
),
TableCell(
child: Center(
child: Texts(pCalGram.ceil().toString() + ' gr'),
),
),
TableCell(
child: Center(
child: Texts(cCalGram.ceil().toString() + ' gr'),
),
),
TableCell(
child: Center(
child: Texts(fCalGram.ceil().toString() + ' gr'),
),
),
]),
TableRow(children: [
Padding(
padding: EdgeInsets.all(8.0),
child: TableCell(
child: Center(
child: Texts('Grams Per\n Meal'),
),
),
),
TableCell(
child: Center(
child: Texts(pCalMeal.ceil().toString() + ' gr'),
),
),
TableCell(
child: Center(
child: Texts(cCalMeal.ceil().toString() + ' gr'),
),
),
TableCell(
child: Center(
child: Texts(fCalMeal.ceil().toString() + ' gr'),
),
),
]),
],
),
),
Container(
width: 350,
child: Button(
label: 'See List Of Doctors',
),
),
],
),
// Texts(pCal.ceil().toString()),
// Texts(cCal.ceil().toString()),
// Texts(fCal.ceil().toString()),
// Texts(pCalGram.ceil().toString()),
// Texts(cCalGram.ceil().toString()),
// Texts(fCalGram.ceil().toString()),
// Texts(pCalMeal.ceil().toString()),
// Texts(cCalMeal.ceil().toString()),
// Texts(fCalMeal.ceil().toString()),
);
}
}

@ -0,0 +1,146 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.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/material.dart';
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
import 'package:intl/intl.dart';
import 'delivery_due_result_page.dart';
class DeliveryDue extends StatefulWidget {
@override
_DeliveryDueState createState() => _DeliveryDueState();
}
class _DeliveryDueState extends State<DeliveryDue> {
DateTime bloodSugarDate = DateTime.now();
DateTime timeSugarDate = DateTime.now();
var dateFrom = DateTime.now();
var dateTo = DateTime.now();
var conceivedDate = DateTime.now();
var deliveryDue = DateTime.now();
var firstTrimester = DateTime.now();
var secondTrimester = DateTime.now();
var thirdTrimester = DateTime.now();
var dt = DateTime.now();
var newFormat = DateFormat("yy-MM-dd");
String getDate() {
return "${DateUtil.getMonth(bloodSugarDate.month)} ${bloodSugarDate.day}, ${bloodSugarDate.year}";
}
String getTime() {
return " ${timeSugarDate.hour}:${timeSugarDate.minute}";
}
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: 'Delivery Due Date',
body: Padding(
padding: EdgeInsets.symmetric(horizontal: 35.0, vertical: 20.0),
child: SingleChildScrollView(
child: Container(
child: Column(
//mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Texts(
'Congratulations, you are pregnant! Now when will the new baby arrive? To estimate the due date, enter the date when the last menstrual perios began (the first day), then click calculate.',
),
Divider(
//height: 2,
thickness: 2,
),
Column(
children: [
Texts(
'What was the date of the first day of the last period?',
),
InkWell(
onTap: () {
DatePicker.showDatePicker(
context,
showTitleActions: true,
minTime: DateTime(DateTime.now().year - 1, 1, 1),
maxTime: DateTime.now(),
onConfirm: (date) {
print('confirm $date');
setState(() {
bloodSugarDate == date
? null
: bloodSugarDate = DateTime.now();
dateFrom = date.add(Duration(days: 10));
dateTo = date.add(Duration(days: 20));
conceivedDate = date.add(Duration(days: 14));
deliveryDue = date.add(Duration(days: 280));
firstTrimester = date.add(Duration(days: 85));
secondTrimester = date.add(Duration(days: 190));
thirdTrimester = date.add(Duration(days: 280));
});
},
currentTime: DateTime.now(),
);
},
child: Container(
padding: EdgeInsets.all(12),
width: double.infinity,
height: 65,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Icon(Icons.date_range),
Texts('Date'),
],
),
Texts(getDate()),
],
),
),
),
],
),
SizedBox(
height: 280.0,
),
Container(
height: 100.0,
width: 350.0,
child: Button(
label: 'CALCULATE',
onTap: () {
setState(() {
{
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => DeliveryDueResult(
conceivedDate: conceivedDate,
dateFrom: dateFrom,
dateTo: dateTo,
deliveryDue: deliveryDue,
firstTrimester: firstTrimester,
secondTrimester: secondTrimester,
thirdTrimester: thirdTrimester,
)),
);
}
});
},
),
),
],
),
),
),
),
);
}
}

@ -0,0 +1,106 @@
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/material.dart';
import 'package:intl/intl.dart';
class DeliveryDueResult extends StatelessWidget {
var dateFrom;
var dateTo;
var conceivedDate;
var deliveryDue;
var firstTrimester;
var secondTrimester;
var thirdTrimester;
DeliveryDueResult(
{this.dateFrom,
this.dateTo,
this.conceivedDate,
this.deliveryDue,
this.firstTrimester,
this.secondTrimester,
this.thirdTrimester});
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: 'Delivery Due Date',
body: Padding(
padding: EdgeInsets.symmetric(horizontal: 30.0, vertical: 12.0),
child: SingleChildScrollView(
child: Container(
height: 750.0,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Texts(
'The next ovulation period is estimated to be:',
fontWeight: FontWeight.w400,
),
Texts(
'From:',
fontWeight: FontWeight.w400,
),
Texts(DateFormat.yMMMEd().format(dateFrom),
fontWeight: FontWeight.w800,
fontSize: 21.0,
color: Color(0xffC5272D)),
Texts(
'To:',
fontWeight: FontWeight.w400,
),
Texts(DateFormat.yMMMEd().format(dateTo),
fontWeight: FontWeight.w800,
fontSize: 21.0,
color: Color(0xffC5272D)),
Texts(
'You have conceived on:',
fontWeight: FontWeight.w400,
),
Texts(
DateFormat.yMMMEd().format(conceivedDate),
fontWeight: FontWeight.w800,
fontSize: 21.0,
),
Texts(
'First Trimester Ends (12 weeks):',
fontWeight: FontWeight.w400,
),
Texts(
DateFormat.yMMMEd().format(firstTrimester),
fontWeight: FontWeight.w800,
fontSize: 21.0,
),
Texts(
'Second Trimester Ends (27 weeks):',
fontWeight: FontWeight.w400,
),
Texts(
DateFormat.yMMMEd().format(secondTrimester),
fontWeight: FontWeight.w800,
fontSize: 21.0,
),
Texts(
'Third Trimester, Estimated Due Date (40 weeks):',
fontWeight: FontWeight.w400,
),
Texts(
DateFormat.yMMMEd().format(thirdTrimester),
fontWeight: FontWeight.w800,
fontSize: 21.0,
),
Container(
width: 350,
child: Button(
label: 'See List Of Doctors',
),
),
],
),
),
),
),
);
}
}

@ -0,0 +1,557 @@
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/material.dart';
import 'dart:math';
import 'ideal_body_result_page.dart';
const activeCardColor = Color(0xff70777A);
const inactiveCardColor = Color(0xffFAFAFd);
class IdealBody extends StatefulWidget {
@override
_IdealBodyState createState() => _IdealBodyState();
}
class _IdealBodyState extends State<IdealBody> {
bool isMale = false;
bool isHeightCm = true;
Color kgCard = activeCardColor;
Color lbCard = inactiveCardColor;
Color cmCard = activeCardColor;
Color ftCard = inactiveCardColor;
int age = 0;
int height = 0;
double heightInches;
double minRange;
double maxRange;
double overWeightBy;
int weight = 0;
double idealWeight = 0;
String dropdownValue = 'Medium(fingers touch)';
double calories = 0;
String textResult = '';
double maxIdealWeight;
double heightFeet;
void updateColorHeight(int type) {
//MG/DLT card
if (type == 1) {
if (cmCard == inactiveCardColor) {
cmCard = activeCardColor;
ftCard = inactiveCardColor;
} else {
cmCard = inactiveCardColor;
}
}
if (type == 2) {
if (ftCard == inactiveCardColor) {
ftCard = activeCardColor;
cmCard = inactiveCardColor;
} else {
ftCard = inactiveCardColor;
}
}
}
void updateColorWeight(int type) {
//MG/DLT card
if (type == 1) {
if (kgCard == inactiveCardColor) {
kgCard = activeCardColor;
lbCard = inactiveCardColor;
} else {
kgCard = inactiveCardColor;
}
}
if (type == 2) {
if (lbCard == inactiveCardColor) {
lbCard = activeCardColor;
kgCard = inactiveCardColor;
} else {
lbCard = inactiveCardColor;
}
}
}
void calculateIdealWeight() {
heightInches = height * .39370078740157477;
heightFeet = heightInches / 12;
idealWeight = (50 + 2.3 * (heightInches - 60));
if (dropdownValue == 'Small(fingers overlap)') {
idealWeight = idealWeight - 10;
} else if (dropdownValue == 'Medium(fingers touch)') {
idealWeight = idealWeight;
} else if (dropdownValue == 'Large(fingers don\'n touch)') {
idealWeight = idealWeight + 10;
}
maxIdealWeight = (((idealWeight) * 1.1).round() * 100) / 100;
overWeightBy = weight - maxIdealWeight.roundToDouble();
minRange = ((idealWeight / 1.1) * 10).round() / 10;
maxRange = maxIdealWeight;
idealWeight = idealWeight;
}
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: 'Ideal Body Weight',
body: Padding(
padding: EdgeInsets.symmetric(vertical: 15.0, horizontal: 25.0),
child: SingleChildScrollView(
child: Container(
height: 800.0,
child: Column(
children: [
Padding(
padding: EdgeInsets.all(10.0),
child: Texts(
'Calculates the ideal body weight based on height, Weight, and Body Size',
),
),
Divider(
thickness: 2.0,
),
SizedBox(
height: 5.0,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
'Height',
),
Row(
children: [
Expanded(
child: Container(
width: 340.0,
height: 60.0,
decoration: BoxDecoration(
color: Colors.white,
),
child: Row(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
foregroundDecoration: BoxDecoration(
borderRadius:
BorderRadius.circular(5.0),
border: Border.all(
color: Colors.blueGrey,
width: 2.0,
),
),
child: Row(
children: <Widget>[
Expanded(
child: Center(
child: Text(height.toString()),
),
),
Container(
height: 38.0,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: 0.5,
),
),
),
child: InkWell(
child: Icon(
Icons.arrow_drop_up,
size: 18.0,
),
onTap: () {
setState(() {
if (height < 250)
height++;
});
},
),
),
InkWell(
child: Icon(
Icons.arrow_drop_down,
size: 18.0,
),
onTap: () {
setState(() {
if (height > 0) height--;
});
},
),
],
),
),
],
),
),
),
),
Expanded(
child: Slider(
value: height.toDouble(),
min: 0,
max: 250,
onChanged: (double newValue) {
setState(() {
height = newValue.round();
});
},
activeColor: Color(0xffC5272D),
inactiveColor: Color(0xffF3C5C6),
),
),
],
),
),
),
],
),
Texts('Select Unit'),
SizedBox(
height: 5.0,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
GestureDetector(
onTap: () {
setState(() {
updateColorHeight(1);
isHeightCm = true;
});
},
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')),
),
),
),
GestureDetector(
onTap: () {
setState(() {
updateColorHeight(2);
isHeightCm = false;
});
},
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
),
],
),
child: Padding(
padding:
const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts('Ft')),
),
),
),
],
),
SizedBox(
height: 45.0,
),
Divider(
thickness: 2.0,
),
Texts(
'Weight',
),
SizedBox(
height: 5.0,
),
Row(
children: [
Expanded(
child: Container(
width: 340.0,
height: 60.0,
decoration: BoxDecoration(
color: Colors.white,
),
child: Row(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
foregroundDecoration: BoxDecoration(
borderRadius:
BorderRadius.circular(5.0),
border: Border.all(
color: Colors.blueGrey,
width: 2.0,
),
),
child: Row(
children: <Widget>[
Expanded(
child: Center(
child: Text(weight.toString()),
),
),
Container(
height: 38.0,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: 0.5,
),
),
),
child: InkWell(
child: Icon(
Icons.arrow_drop_up,
size: 18.0,
),
onTap: () {
setState(() {
if (weight < 250)
weight++;
});
},
),
),
InkWell(
child: Icon(
Icons.arrow_drop_down,
size: 18.0,
),
onTap: () {
setState(() {
if (weight > 0) weight--;
});
},
),
],
),
),
],
),
),
),
),
Expanded(
child: Slider(
value: weight.toDouble(),
min: 0,
max: 250,
onChanged: (double newValue) {
setState(() {
weight = newValue.round();
});
},
activeColor: Color(0xffC5272D),
inactiveColor: Color(0xffF3C5C6),
),
),
],
),
),
),
],
),
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
),
],
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
),
],
),
child: Padding(
padding:
const EdgeInsets.symmetric(horizontal: 16.0),
child: Center(child: Texts('LB')),
),
),
),
],
),
SizedBox(
height: 45.0,
),
Divider(
thickness: 2.0,
),
SizedBox(
height: 5.0,
),
Texts('Body Frame Size'),
Container(
width: 300,
child: DropdownButton<String>(
value: dropdownValue,
icon: Icon(Icons.arrow_downward),
iconSize: 24,
elevation: 16,
style: TextStyle(color: Colors.black87),
underline: Container(
height: 2,
color: Colors.black54,
),
onChanged: (String newValue) {
setState(() {
dropdownValue = newValue;
});
},
items: <String>[
'Small(fingers overlap)',
'Medium(fingers touch)',
'Large(fingers don\'n touch)',
].map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(
value: value,
child: Text(value),
);
}).toList(),
),
),
SizedBox(
height: 30.0,
),
Container(
height: 100.0,
width: 350.0,
child: Button(
label: 'CALCULATE',
onTap: () {
setState(() {
// calculateBmr();
// calculateCalories();
calculateIdealWeight();
print(idealWeight);
//print(overWeightBy);
{
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => IdealBodyResult(
idealBodyWeight: idealWeight,
minRange: minRange,
mixRange: maxRange,
overWeightBy: overWeightBy,
textResult: textResult,
)),
);
}
});
},
),
),
],
),
],
),
),
),
),
);
}
}

@ -0,0 +1,170 @@
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/material.dart';
import 'dart:math';
class IdealBodyResult extends StatelessWidget {
final double idealBodyWeight;
final double minRange;
final double mixRange;
final double overWeightBy;
final String textResult;
IdealBodyResult(
{this.idealBodyWeight,
this.minRange,
this.mixRange,
this.overWeightBy,
this.textResult});
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: 'Ideal Body Weight',
body: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Texts(
'Ideal weight range is',
fontSize: 23.0,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Row(
children: [
Texts(
minRange.toStringAsFixed(1),
fontSize: 30.0,
),
Padding(
padding: EdgeInsets.only(top: 8.0, left: 4.0),
child: Text(
'Kg',
style: TextStyle(color: Colors.red),
),
),
],
),
Icon(
Icons.arrow_forward,
color: Colors.red,
size: 55.0,
),
Row(
children: [
Texts(
mixRange.toStringAsFixed(1),
fontSize: 30.0,
),
Padding(
padding: EdgeInsets.only(top: 8.0, left: 4.0),
child: Text(
'Kg',
style: TextStyle(color: Colors.red),
),
),
],
),
],
),
overWeightBy >= 0 && overWeightBy <= 10
? Column(
children: [
Texts(
'Congratulations! The current weight is\n perfect and considered healthy',
fontSize: 20.0,
),
],
)
: overWeightBy > 10 && overWeightBy < 17
? Column(
children: [
Texts(
'This means that the weight is a little bit more than ideal weight by'),
Texts(overWeightBy.toStringAsFixed(1)),
Texts(
'May wish to consult with the doctor for medical help. Click to view our list of Doctors'),
],
)
: overWeightBy >= 18
? Container(
height: 250.0,
width: 350,
child: Column(
children: [
Texts(
'Means that you suffer from excessive\n obesity by',
),
SizedBox(
height: 55.0,
),
Texts(
overWeightBy.toStringAsFixed(1),
fontSize: 40.0,
),
SizedBox(
height: 25.0,
),
Texts(
'May wish to consult with the doctor for\n medical help. Click to view our list of\n Doctors'),
],
),
)
: overWeightBy < -18
? Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'Under Weight',
fontSize: 18.0,
),
),
SizedBox(
height: 55.0,
),
Texts(
overWeightBy.toStringAsFixed(1),
fontSize: 20.0,
),
],
)
: Container(
height: 250.0,
width: 350.0,
child: Column(
children: [
Texts(
'under wheight',
fontSize: 20.0,
),
SizedBox(
height: 55.0,
),
Texts(
overWeightBy.toStringAsFixed(1),
fontSize: 20.0,
),
SizedBox(
height: 25.0,
),
Texts(
'May wish to consult with the doctor for\n medical help. Click to view our list of\n Doctors'),
],
),
),
Container(
width: 350,
child: Button(
label: 'See List Of Doctors',
),
),
],
),
);
}
}

@ -0,0 +1,351 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.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/material.dart';
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
import 'package:intl/intl.dart';
import 'ovulation_result_page.dart';
class OvulationPeriod extends StatefulWidget {
@override
_OvulationPeriodState createState() => _OvulationPeriodState();
}
class _OvulationPeriodState extends State<OvulationPeriod> {
DateTime bloodSugarDate = DateTime.now();
DateTime timeSugarDate = DateTime.now();
int cycleLength = 0;
int lutealPhaseLength = 0;
String selectedDate;
var dateFrom = DateTime.now();
var dateTo = DateTime.now();
var conceivedDate = DateTime.now();
var deliveryDue = DateTime.now();
var dt = DateTime.now();
var newFormat = DateFormat("yy-MM-dd");
String updatedDt;
String getTime() {
return " ${timeSugarDate.hour}:${timeSugarDate.minute}";
}
String getDate() {
return "${DateUtil.getMonth(bloodSugarDate.month)} ${bloodSugarDate.day}, ${bloodSugarDate.year}";
}
// void calculate() {}
//
// void calculateFertility(DateTime selectedDate) {const diff = Date.}
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: 'Ovulation Period',
body: Padding(
padding: EdgeInsets.symmetric(horizontal: 25.0, vertical: 15.0),
child: SingleChildScrollView(
child: Container(
height: 700.0,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Calculates Ovulation Period'),
SizedBox(
height: 12.0,
),
Divider(
//height: 2,
thickness: 2,
),
SizedBox(
height: 12.0,
),
InkWell(
onTap: () {
DatePicker.showDatePicker(
context,
showTitleActions: true,
minTime: DateTime(DateTime.now().year - 1, 1, 1),
maxTime: DateTime.now(),
onConfirm: (date) {
print('confirm $date');
setState(() {
bloodSugarDate = date;
dateFrom = date.add(Duration(days: 10));
updatedDt = DateFormat.yMMMEd().format(dateFrom);
dateTo = date.add(Duration(days: 20));
conceivedDate = date.add(Duration(days: 14));
deliveryDue = date.add(Duration(days: 280));
});
},
currentTime: DateTime.now(),
);
},
child: Container(
padding: EdgeInsets.all(12),
width: double.infinity,
height: 65,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts('Date'),
Texts(getDate()),
],
),
),
),
SizedBox(
height: 5.0,
),
Texts(
'Average Cycle Length (usually 28 days):',
fontWeight: FontWeight.w400,
),
SizedBox(
height: 5.0,
),
Row(
children: [
Container(
width: 340.0,
height: 60.0,
decoration: BoxDecoration(
color: Colors.white,
),
child: Row(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
foregroundDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(5.0),
border: Border.all(
color: Colors.blueGrey,
width: 2.0,
),
),
child: Row(
children: <Widget>[
Expanded(
child: Center(
child: Text(cycleLength.toString()),
),
),
Container(
height: 38.0,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: 0.5,
),
),
),
child: InkWell(
child: Icon(
Icons.arrow_drop_up,
size: 18.0,
),
onTap: () {
setState(() {
if (cycleLength < 45)
cycleLength++;
});
},
),
),
InkWell(
child: Icon(
Icons.arrow_drop_down,
size: 18.0,
),
onTap: () {
setState(() {
if (cycleLength > 0)
cycleLength--;
});
},
),
],
),
),
],
),
),
),
),
Expanded(
child: Slider(
value: cycleLength.toDouble(),
min: 0,
max: 45,
onChanged: (double newValue) {
setState(() {
cycleLength = newValue.round();
});
},
activeColor: Color(0xffC5272D),
inactiveColor: Color(0xffF3C5C6),
),
),
],
),
),
],
),
Texts(
'Average Luteal Phase Length (usually 14 days):',
fontWeight: FontWeight.w400,
),
SizedBox(
height: 5.0,
),
Row(
children: [
Container(
width: 340.0,
height: 60.0,
decoration: BoxDecoration(
color: Colors.white,
),
child: Row(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 8.0),
child: Center(
child: Container(
width: 60.0,
foregroundDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(5.0),
border: Border.all(
color: Colors.blueGrey,
width: 2.0,
),
),
child: Row(
children: <Widget>[
Expanded(
child: Center(
child:
Text(lutealPhaseLength.toString()),
),
),
Container(
height: 38.0,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: 0.5,
),
),
),
child: InkWell(
child: Icon(
Icons.arrow_drop_up,
size: 18.0,
),
onTap: () {
setState(() {
if (lutealPhaseLength < 15)
lutealPhaseLength++;
});
},
),
),
InkWell(
child: Icon(
Icons.arrow_drop_down,
size: 18.0,
),
onTap: () {
setState(() {
if (lutealPhaseLength > 0)
lutealPhaseLength--;
});
},
),
],
),
),
],
),
),
),
),
Expanded(
child: Slider(
value: lutealPhaseLength.toDouble(),
min: 0,
max: 15,
onChanged: (double newValue) {
setState(() {
lutealPhaseLength = newValue.round();
});
},
activeColor: Color(0xffC5272D),
inactiveColor: Color(0xffF3C5C6),
),
),
],
),
),
],
),
SizedBox(
height: 220.0,
),
Container(
height: 100.0,
width: 350.0,
child: Button(
label: 'CALCULATE',
onTap: () {
setState(() {
{
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => OvulationResult(
conceivedDate: conceivedDate,
dateFrom: dateFrom,
dateTo: dateTo,
deliveryDue: deliveryDue,
)),
);
}
});
},
),
),
],
),
),
),
),
);
}
}

@ -0,0 +1,96 @@
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/material.dart';
import 'package:intl/intl.dart';
class OvulationResult extends StatelessWidget {
var dateFrom;
var dateTo;
var conceivedDate;
var deliveryDue;
OvulationResult(
{this.dateFrom, this.dateTo, this.deliveryDue, this.conceivedDate});
//var newFormat = DateFormat("yy-MM-dd");
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: 'Ovulation Period',
body: Padding(
padding: EdgeInsets.symmetric(horizontal: 30.0, vertical: 15.0),
child: SingleChildScrollView(
child: Container(
height: 750.0,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Texts(
'The next ovulation period is estimated to be:',
fontWeight: FontWeight.w400,
),
Texts(
'From:',
fontWeight: FontWeight.w400,
),
Texts(
DateFormat.yMMMEd().format(dateFrom),
fontWeight: FontWeight.w800,
fontSize: 21.0,
),
Texts(
'To:',
fontWeight: FontWeight.w400,
),
Texts(
DateFormat.yMMMEd().format(dateTo),
fontWeight: FontWeight.w800,
fontSize: 21.0,
),
Texts(
'Useful Information:',
color: Color(0xffC5272D),
),
Texts(
'You have conceived on:',
fontWeight: FontWeight.w400,
),
Texts(
DateFormat.yMMMEd().format(conceivedDate),
fontWeight: FontWeight.w800,
fontSize: 21.0,
),
Texts(
'The baby\'s age right now:',
fontWeight: FontWeight.w400,
),
Texts(
'5 Weeks, 2',
fontWeight: FontWeight.w800,
fontSize: 21.0,
),
Texts(
'The delivery due date is estimated to be on the: ',
fontWeight: FontWeight.w400,
),
Texts(
DateFormat.yMMMEd().format(deliveryDue),
fontWeight: FontWeight.w800,
fontSize: 21.0,
),
Container(
width: 350,
child: Button(
label: 'See List Of Doctors',
),
),
],
),
),
),
),
);
}
}

@ -96,7 +96,7 @@ class _BloodCholesterolState extends State<BloodCholesterol> {
children: [
Texts(
'Convert from',
)
),
],
),
),
@ -190,7 +190,7 @@ class _BloodCholesterolState extends State<BloodCholesterol> {
child: TextFormField(
controller: textController,
inputFormatters: <TextInputFormatter>[
FilteringTextInputFormatter.digitsOnly
// FilteringTextInputFormatter.digitsOnly
],
keyboardType: TextInputType.number,
decoration: InputDecoration(

@ -192,7 +192,7 @@ class _BloodSugarState extends State<BloodSugar> {
child: TextFormField(
controller: textController,
inputFormatters: <TextInputFormatter>[
FilteringTextInputFormatter.digitsOnly
// FilteringTextInputFormatter.digitsOnly
],
keyboardType: TextInputType.number,
decoration: InputDecoration(

@ -188,7 +188,7 @@ class _TriglyceridesState extends State<Triglycerides> {
child: TextFormField(
controller: textController,
inputFormatters: <TextInputFormatter>[
FilteringTextInputFormatter.digitsOnly
// FilteringTextInputFormatter.digitsOnly
],
keyboardType: TextInputType.number,
decoration: InputDecoration(

@ -0,0 +1,283 @@
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_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/ovulation_period/ovulation_period.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';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'health_calculator/bmi_calculator/bmi_calculator.dart';
import 'health_calculator/bmr_calculator/bmr_calculator.dart';
import 'health_calculator/calorie_calculator/calorie_calculator.dart';
import 'health_calculator/delivery_due/delivery_due.dart';
import 'health_calculator/ideal_body/ideal_body.dart';
class HealthCalculators extends StatefulWidget {
@override
_HealthCalculatorsState createState() => _HealthCalculatorsState();
}
class _HealthCalculatorsState extends State<HealthCalculators>
with SingleTickerProviderStateMixin {
TabController _tabController;
void initState() {
super.initState();
_tabController = TabController(length: 2, vsync: this);
}
void dispose() {
super.dispose();
_tabController.dispose();
}
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: 'Health Calculators',
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(
preferredSize: Size.fromHeight(70.0),
child: Stack(
children: [
Center(
child: Container(
height: 60.0,
margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 1.9,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Theme.of(context).dividerColor,
width: 5.7,
),
),
color: Colors.white,
),
child: Center(
child: TabBar(
controller: _tabController,
isScrollable: true,
indicatorWeight: 4.0,
indicatorColor: Colors.red,
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.symmetric(horizontal: 13.0, vertical: 2.0),
unselectedLabelColor: Colors.grey,
tabs: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.35,
child: Center(
child: Texts('General Health'),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.35,
child: Center(
child: Texts("Women's Health"),
),
),
],
),
),
),
)
],
),
),
body: Column(
children: [
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: [
Container(
child: Column(
children: [
Container(
width: double.infinity,
height: 80,
),
Row(
children: [
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(page: BMICalculator()),
);
},
child: MedicalProfileItem(
title: 'BMI',
imagePath: 'bmi_health_calculator.png',
subTitle: 'Calculators',
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: CalorieCalculator(),
),
);
},
child: MedicalProfileItem(
title: 'Calories',
imagePath: 'calories-calculator.png',
subTitle: 'Calculators',
),
),
),
],
),
Row(
children: [
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: BmrCalculator(),
),
);
},
child: MedicalProfileItem(
title: 'BMR',
imagePath: 'BMR_calculator.png',
subTitle: 'Calculators',
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: IdealBody(),
),
);
},
child: MedicalProfileItem(
title: 'Ideal Body',
imagePath: 'body_weight.png',
subTitle: 'Weight',
),
),
),
],
),
Row(
children: [
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: BodyFat(),
),
);
},
child: MedicalProfileItem(
title: 'Body',
imagePath: 'body_fat.png',
subTitle: 'Fat',
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: Carbs(),
),
);
},
child: MedicalProfileItem(
title: 'Carbohydrate',
imagePath: 'carb_protein.png',
subTitle: 'Protein Fat',
),
),
),
],
),
],
),
),
Container(
child: Column(
children: [
Container(
width: double.infinity,
height: 80,
),
Row(
children: [
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(page: OvulationPeriod()),
);
},
child: MedicalProfileItem(
title: 'Ovulation',
imagePath: 'ovulation_period_icon.png',
subTitle: 'Period',
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: DeliveryDue(),
),
);
},
child: MedicalProfileItem(
title: 'Delivery',
imagePath: 'delivery_date_icon.png',
subTitle: 'Due Date',
),
),
),
],
),
],
),
),
],
),
)
],
),
),
);
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save