Merge branch 'development_new_design_2.0' into mirza_home_page

# Conflicts:
#	lib/pages/insurance/insurance_card_screen.dart
#	lib/pages/medical/balance/advance_payment_page.dart
#	lib/pages/medical/balance/confirm_payment_page.dart
merge-update-with-lab-changes
Mirza.Shafique 4 years ago
commit 3af1676730

@ -163,13 +163,11 @@ const SEND_MEDICAL_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendMedicalRe
///Rate
const IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated';
const GET_APPOINTMENT_DETAILS_BY_NO = 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo';
const NEW_RATE_APPOINTMENT_URL = "Services/Doctors.svc/REST/AppointmentsRating_InsertAppointmentRate";
const NEW_RATE_DOCTOR_URL = "Services/Doctors.svc/REST/DoctorsRating_InsertDoctorRate";
const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
//const BASE_URL = 'https://hmgwebservices.com/'; // Production Environment
//const BASE_URL = 'https://hmgwebservices.com/Services'; // Production Environment
//const BASE_URL = 'https://uat.hmgwebservices.com/Services'; // UAT Environment
//URL to get clinic list
const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized";

@ -303,11 +303,11 @@ const Map localizedValues = {
"gate": {"en": "Gate:", "ar": "بوابة"},
"building": {"en": "Building:", "ar": "المبنى"},
"branch": {"en": "Branch:", "ar": "الفرع"},
"emergencyServices": {"en": "Emergency Services:", "ar": "خدمات الطوارئ"},
"nearester": {"en": "Nearest ER:", "ar": "أقرب طوارى"},
"locationa": {"en": "location:", "ar": "الموقع"},
"ambulancerequest": {"en": "Ambulance :", "ar": "طلب نقل "},
"requestA": {"en": "Request:", "ar": "اسعاف"},
"emergencyServices": {"en": "Emergency Services", "ar": "خدمات الطوارئ"},
"nearester": {"en": "Nearest ER", "ar": "أقرب طوارى"},
"locationa": {"en": "location", "ar": "الموقع"},
"ambulancerequest": {"en": "Ambulance", "ar": "طلب نقل "},
"requestA": {"en": "Request", "ar": "اسعاف"},
"MyAppointments": {"en": "My", "ar": "مواعيدي"},
"NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"},
"NoConfirmedAppointments": {"en": "No Confirmed Appointments", "ar": "لا توجد مواعيد مؤكدة"},
@ -418,7 +418,7 @@ const Map localizedValues = {
"PleaseEnterTheVerificationCode": {"en": "Please enter the verification code send to", "ar": "الرجاء إدخال رمز التحقق المرسل إلى"},
"EyeMeasurements": {"en": "Eye Measurements", "ar": "قياسات النظر"},
"Measurements": {"en": "Measurements", "ar": "قياسات"},
"Classes": {"en": "Classes", "ar": "نظارات"},
"Classes": {"en": "Glasses", "ar": "نظارات"},
"ContactLens": {"en": "Contact Lens", "ar": "العدسات اللاصقة"},
"RightEye": {"en": "Right Eye", "ar": "العين اليمين"},
"Sphere": {"en": "Sphere", "ar": "القوة"},
@ -901,9 +901,9 @@ const Map localizedValues = {
"YouCanPayByTheFollowingOptions": {"en": "You can pay by the following options:", "ar": "I Accept the Terms And Conditions"},
"RRTDDetails": {
"en":
"The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a copmplete medical team at home",
"The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a complete medical team at home",
"ar":
"The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a copmplete medical team at home"
"The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a complete medical team at home"
},
"rrtService": {"en": "RRT Service", "ar": "خدمة RRT"},
"bill-amount": {"en": "Bill Amount", "ar": "مبلغ الفاتورة"},
@ -1417,5 +1417,48 @@ const Map localizedValues = {
},
"dental-procedure-list": {"en": "Dental Procedures for this Appointment: ", "ar": "إجراءات الأسنان لهذا الموعد:"},
"time-needed": {"en": "Time Needed:", "ar": "الوقت اللازم:"},
"total-time-needed": {"en": "Total Appointment Time:", "ar": "وقت المواعيد الكلي:"},
"total-time-needed": {
"en": "Total Appointment Time:",
"ar": "وقت المواعيد الكلي:"
},
"info-eye": {
"en": "This service allows you to view all the eye measurements, lenses, and eyeglasses that have been made in the Habib Medical Group.",
"ar": " خدمة قياسات النظر: هذه الخدمة تمكنك من الاطلاع على جميع قياسات النظر والعدسات والنظارات التي تمت في مجموعة الحبيب الطبية."
},
"info-vaccines": {
"en": "This service allows you to view all the vaccinations that were taken in Al Habib Medical Group.",
"ar": "خدمة تطعيماتي: هذه الخدمة تمكنك من الاطلاع على جميع التطعيمات التي تمت في مجموعة الحبيب الطبية."
},
"info-trackers": {
"en": "This service allows you to record the readings of the measurement of sugar, pressure, and weight and then refer to them as a reference in addition to view the statistics charts.",
"ar": "متابعة قراءاتي: هذه الخدمة تمكنك من تسجيل قراءات قياس السكر والضغط والوزن بشكل دوري ومن ثم الاطلاع عليها كمرجع وكذلك الاطلاع على الرسوم البيانية لمتابعة تطور الحالة."
},
"info-health-data": {
"en": "This service is designed to allows you to synchronize the health data from your smart watches into your health record system in Habib Medical Group so that the doctors you are visiting can analyze your health & activity level.",
"ar": "تم تصميم هذه الخدمة للسماح لك بمزامنة البيانات الصحية من ساعاتك الذكية الى نظام السجلات الصحية الخاص بك في مجموعة حبيب الطبية حتى يتمكن الأطباء الذين تزورهم من تحليل مستوى صحتك ونشاطك."
},
"info-ask-doc": {
"en": "This service allows you to ask the doctor you have visited during the last 14 days. When you receive a response from the doctor, you will be notified via the system to view the doctor's reply.",
"ar": "اسال طبيبك: هذه الخدمة تمكنك من توجيه استفسارات الى الطبيب الذي قمت بزيارته خلال اخر 14 يوم وكذلك عند تلقى الرد من الطبيب سوف يتم ابلاغك عن طريق النظام للاطلاع على رد الطبيب."
},
"info-auto-wifi": {
"en": "This service allows you to connect to the Internet directly without the need for entering a user name or password.",
"ar": "الاتصال بالانترنت: هذه الخدمة تمكنك من الاتصال بالانترنت مباشرة دون الحاجة الى اسم مستخدم او كلمة مرور."
},
"auto-wifi": {
"en": "Connect To Internet",
"ar": "الإتصال بالإنترنت"
},
"child-vaccine-info": {
"en": "This service to remind you of the deadlines of the necessary vaccinations for your childs against diseases targeted by immunization according to the MOH vaccinations schedule by sending a reminding message and notifications of the vaccination date to the registered mobile phone.",
"ar": "هذه الخدمة تم تصميمها لتذكيرك بالمواعيد النهائية للتحصينات اللازمة لطفلك ضد الأمراض المستهدفة بالتحصين وفقًا لجدول تطعيمات وزارة الصحة عن طريق إرسال رسالة تذكير وإشعارات عن مواعيد التطعيم على الجوال المسجل."
},
"h2o-info": {
"en": "This service is designed to help you to set drinking water goals and track the volume of water you are drinking on a daily basis. This service allows for schedule reminders and offers a basic statistical analysis of the amount of what you have consumed over the course of a day, week or month.",
"ar": "تم تصميم هذه الخدمة لمساعدتك في تحديد وتتبع كميات المياه التي يتوجب شربها بشكل يومي. كما توفر هذه الخدمة تذكيرات الجدول الزمني وتقدم تحليلًا إحصائيًا لمقدار ما استهلكته خلال اليوم أو الأسبوع أو الشهر."
},
"ask-doc-empty": {
"en": "This service is available to doctors visited during the past 15 days",
"ar": "هذه الخدمة متاحة للاطباء الذين تمت زيارتهم خلال ال 15 يوم الماضية"
},
};

@ -33,3 +33,4 @@ const H2O_UNIT = 'H2O_UNIT';
const H2O_REMINDER = 'H2O_REMINDER';
const LIVECARE_CLINIC_DATA = 'LIVECARE_CLINIC_DATA';
const DOCTOR_SCHEDULE_DATE_SEL = 'DOCTOR_SCHEDULE_DATE_SEL';
const APPOINTMENT_HISTORY_MEDICAL = 'APPOINTMENT_HISTORY_MEDICAL';

@ -1,7 +1,7 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/rate/appointment_details.dart';
import 'package:diplomaticquarterapp/core/model/rate/appointment_rate.dart';
import 'package:diplomaticquarterapp/core/model/rate/appoitment_rated.dart';
import 'package:diplomaticquarterapp/core/model/rate/appointment_details.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
class AppointmentRateService extends BaseService {
@ -10,8 +10,7 @@ class AppointmentRateService extends BaseService {
Future getIsLastAppointmentRatedList() async {
hasError = false;
await baseAppClient.post(IS_LAST_APPOITMENT_RATED,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(IS_LAST_APPOITMENT_RATED, onSuccess: (dynamic response, int statusCode) {
appointmentRatedList.clear();
response['IsLastAppoitmentRatedList'].forEach((appoint) {
appointmentRatedList.add(AppoitmentRated.fromJson(appoint));
@ -27,19 +26,15 @@ class AppointmentRateService extends BaseService {
Map<String, dynamic> bodyData = Map();
bodyData['AppointmentNumber'] = appointmentRatedList[0].appointmentNo;
bodyData['ProjectID'] = appointmentRatedList[0].projectID;
await baseAppClient.post(GET_APPOINTMENT_DETAILS_BY_NO,
onSuccess: (dynamic response, int statusCode) {
if (response['AppointmentDetails'] != null)
appointmentDetails =
AppointmentDetails.fromJson(response['AppointmentDetails']);
await baseAppClient.post(GET_APPOINTMENT_DETAILS_BY_NO, onSuccess: (dynamic response, int statusCode) {
if (response['AppointmentDetails'] != null) appointmentDetails = AppointmentDetails.fromJson(response['AppointmentDetails']);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: bodyData);
}
Future sendAppointmentRate(int rate, int appointmentNo, int projectID,
int doctorID, int clinicID, String note) async {
Future sendAppointmentRate(int rate, int appointmentNo, int projectID, int doctorID, int clinicID, String note) async {
hasError = false;
AppointmentRate appointmentRate = AppointmentRate();
appointmentRate.rate = rate;
@ -48,18 +43,45 @@ class AppointmentRateService extends BaseService {
appointmentRate.doctorID = doctorID;
appointmentRate.clinicID = clinicID;
appointmentRate.note = note;
appointmentRate.createdBy = 2;
appointmentRate.editedBy = 2;
await baseAppClient.post(GET_APPOINTMENT_DETAILS_BY_NO,
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
await baseAppClient.post(NEW_RATE_APPOINTMENT_URL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: appointmentRate.toJson());
}
Future sendDoctorRate(int rate, int appointmentNo, int projectID, int doctorID, int clinicID, String note, String appoDate, String docName, String projectName, String clinicName) async {
Map<String, dynamic> request;
hasError = false;
request = {
"DoctorID": doctorID,
"Rate": rate,
"ClinicID": clinicID,
"ProjectID": projectID,
"AppointmentNo": appointmentNo,
"Note": note,
"MobileNumber": authenticatedUserObject.user.mobileNumber,
"AppointmentDate": appoDate,
"DoctorName": docName,
"ProjectName": projectName,
"COCTypeName": 1,
"PatientName": authenticatedUserObject.user.firstName + " " + authenticatedUserObject.user.lastName,
"PatientOutSA": authenticatedUserObject.user.outSA,
"PatientTypeID": authenticatedUserObject.user.patientType,
"ClinicName": clinicName,
"PatientIdentificationID": authenticatedUserObject.user.patientIdentificationNo
};
await baseAppClient.post(NEW_RATE_DOCTOR_URL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: request);
}
AppoitmentRated get lastAppointmentRated {
if (appointmentRatedList.length > 0)
return appointmentRatedList[appointmentRatedList.length - 1];
if (appointmentRatedList.length > 0) return appointmentRatedList[appointmentRatedList.length - 1];
return null;
}

@ -7,9 +7,6 @@ class ErService extends BaseService {
List<ProjectAvgERWaitingTime> projectAvgERWaitingTimeModelList = List();
Map<String, dynamic> body = Map();
String Latitude = "";
String Longitude = "";
String PhoneNumber = "";
Future getProjectAvgERWaitingTimeOrders({int id, int projectID}) async {
hasError = false;
@ -23,21 +20,15 @@ class ErService extends BaseService {
body['Latitude'] = lat ?? 0;
body['Longitude'] = long ?? 0;
dynamic localRes;
await baseAppClient.post(GET_NEAREST_HOSPITAL,
onSuccess: (dynamic response, int statusCode) {
projectAvgERWaitingTimeModelList.clear();
response['List_ProjectAvgERWaitingTime'].forEach((vital) {
projectAvgERWaitingTimeModelList
.add(ProjectAvgERWaitingTime.fromJson(vital));
});
projectAvgERWaitingTimeModelList.forEach((element) {
Latitude = '${element.latitude}';
Longitude = '${element.longitude}';
PhoneNumber = '${element.phoneNumber}';
});
localRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
return Future.value(localRes);
}
}

@ -16,14 +16,16 @@ class AskDoctorService extends BaseService {
body['DoctorID'] = doctorId;
body['ProjectID'] = projectId;
dynamic localRes;
await baseAppClient.post(GET_CALL_INFO_HOURS_RESULT,
onSuccess: (dynamic response, int statusCode) {
///OKAY
var asd="";
localRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
return Future.value(localRes);
}
Future getCallRequestTypeLOV() async {

@ -3,6 +3,7 @@ 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';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleResponse.dart';
@ -18,16 +19,24 @@ class MedicalService extends BaseService {
body['IsActiveAppointment'] = true;
body['isDentalAllowedBackend'] = false;
}
await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY, onSuccess: (response, statusCode) async {
var appoHistory = await sharedPref.getObject(APPOINTMENT_HISTORY_MEDICAL);
if (appoHistory != null) {
appoitmentAllHistoryResultList.clear();
response['AppoimentAllHistoryResultList'].forEach((appoitment) {
appoHistory.forEach((appoitment) {
appoitmentAllHistoryResultList.add(AppoitmentAllHistoryResultList.fromJson(appoitment));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
} else {
await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY, onSuccess: (response, statusCode) async {
appoitmentAllHistoryResultList.clear();
response['AppoimentAllHistoryResultList'].forEach((appoitment) {
appoitmentAllHistoryResultList.add(AppoitmentAllHistoryResultList.fromJson(appoitment));
});
sharedPref.setObject(APPOINTMENT_HISTORY_MEDICAL, response['AppoimentAllHistoryResultList']);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
}
addAmbulanceRequest({@required PatientER patientER}) async {

@ -17,7 +17,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
class MyBalanceService extends BaseService {
List<PatientAdvanceBalanceAmount> patientAdvanceBalanceAmountList = List();
double totalAdvanceBalanceAmount;
dynamic totalAdvanceBalanceAmount;
List<PatientInfo> patientInfoList = List();
GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse =
GetAllSharedRecordsByStatusResponse();

@ -3,16 +3,15 @@ import 'package:diplomaticquarterapp/core/model/rate/appointment_details.dart';
import 'package:diplomaticquarterapp/core/model/rate/appoitment_rated.dart';
import 'package:diplomaticquarterapp/core/service/appointment_rate_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import '../../locator.dart';
class AppointmentRateViewModel extends BaseViewModel {
AppointmentRateService _appointmentRateService =
locator<AppointmentRateService>();
AppointmentRateService _appointmentRateService = locator<AppointmentRateService>();
bool isHaveAppointmentNotRate = false;
AppointmentDetails get appointmentDetails => _appointmentRateService.appointmentDetails;
Future getIsLastAppointmentRatedList() async {
isHaveAppointmentNotRate = false;
setState(ViewState.Busy);
@ -21,8 +20,7 @@ class AppointmentRateViewModel extends BaseViewModel {
error = _appointmentRateService.error;
setState(ViewState.Error);
} else {
if(_appointmentRateService.appointmentRatedList.length>0)
await getAppointmentDetails();
if (_appointmentRateService.appointmentRatedList.length > 0) await getAppointmentDetails();
}
}
@ -32,17 +30,14 @@ class AppointmentRateViewModel extends BaseViewModel {
error = _appointmentRateService.error;
setState(ViewState.Error);
} else {
if (_appointmentRateService.appointmentDetails != null)
isHaveAppointmentNotRate = true;
if (_appointmentRateService.appointmentDetails != null) isHaveAppointmentNotRate = true;
setState(ViewState.Idle);
}
}
Future sendAppointmentRate(int rate, int appointmentNo, int projectID,
int doctorID, int clinicID, String note) async {
Future sendAppointmentRate(int rate, int appointmentNo, int projectID, int doctorID, int clinicID, String note) async {
setState(ViewState.Busy);
await _appointmentRateService.sendAppointmentRate(
rate, appointmentNo, projectID, doctorID, clinicID, note);
await _appointmentRateService.sendAppointmentRate(rate, appointmentNo, projectID, doctorID, clinicID, note);
if (_appointmentRateService.hasError) {
error = _appointmentRateService.error;
setState(ViewState.ErrorLocal);
@ -52,14 +47,23 @@ class AppointmentRateViewModel extends BaseViewModel {
}
}
AppoitmentRated get lastAppointmentRated =>
_appointmentRateService.lastAppointmentRated;
Future sendDoctorRate(int rate, int appointmentNo, int projectID, int doctorID, int clinicID, String note, String appoDate, String docName, String projectName, String clinicName) async {
setState(ViewState.Busy);
await _appointmentRateService.sendDoctorRate(rate, appointmentNo, projectID, doctorID, clinicID, note, appoDate, docName, projectName, clinicName);
if (_appointmentRateService.hasError) {
error = _appointmentRateService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
_appointmentRateService.deleteAllAppAppointmentRate();
}
}
deleteAppointmentRated(AppoitmentRated appointmentRated) =>
_appointmentRateService.deleteAppointmentRated(appointmentRated);
AppoitmentRated get lastAppointmentRated => _appointmentRateService.lastAppointmentRated;
deleteAppAppointmentRate() =>
_appointmentRateService.deleteAllAppAppointmentRate();
deleteAppointmentRated(AppoitmentRated appointmentRated) => _appointmentRateService.deleteAppointmentRated(appointmentRated);
deleteAppAppointmentRate() => _appointmentRateService.deleteAllAppAppointmentRate();
setIsRated(bool isRated) {
this.isHaveAppointmentNotRate = isRated;

@ -12,11 +12,10 @@ class DashboardViewModel extends BaseViewModel {
String get heightCm => _vitalSignService.heightCm;
String booldType = "-";
DashboardViewModel() {
this.getPatientRadOrders();
// this.getPatientRadOrders();
}
// ToDoCountProviderModel toDoProvider =
// Provider.of<ToDoCountProviderModel>(AppGlobal.context);
getPatientRadOrders() async {
if (isLogin && _vitalSignService.weightKg.isEmpty) {
@ -31,17 +30,4 @@ class DashboardViewModel extends BaseViewModel {
}
}
}
// getToDoCount() {
// toDoProvider.setState(0);
// ClinicListService service = new ClinicListService();
// service.getActiveAppointmentNo(AppGlobal.context).then((res) {
// print(res['AppointmentActiveNumber']);
// if (res['MessageStatus'] == 1) {
// toDoProvider.setState(res['AppointmentActiveNumber']);
// } else {}
// }).catchError((err) {
// print(err);
// });
// }
}

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/ask_doctor/AskDoctorReqTypes.dart';
import 'package:diplomaticquarterapp/core/model/ask_doctor/DoctorResponse.dart';
@ -6,51 +7,40 @@ import 'package:diplomaticquarterapp/core/service/medical/my_doctor_service.dart
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class AskDoctorViewModel extends BaseViewModel {
AskDoctorService _askDoctorService = locator<AskDoctorService>();
MyDoctorService _myDoctorService = locator<MyDoctorService>();
List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital =
List();
List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital = List();
List<AskDoctorReqTypes> get askDoctorReqTypes =>
_askDoctorService.askDoctorReqTypes;
List<AskDoctorReqTypes> get askDoctorReqTypes => _askDoctorService.askDoctorReqTypes;
List<DoctorResponse> get doctorResponseList =>
_askDoctorService.doctorResponseList;
List<DoctorResponse> get doctorResponseList => _askDoctorService.doctorResponseList;
Future getMyDoctor() async {
setState(ViewState.Busy);
await _myDoctorService.getPatientDoctorAppointmentList(
top: 25, beforeDays: 15);
await _myDoctorService.getPatientDoctorAppointmentList(top: 25, beforeDays: 15);
if (_myDoctorService.hasError) {
error = _myDoctorService.error;
setState(ViewState.Error);
} else
var asd = "";
_myDoctorService.patientDoctorAppointmentList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByClinic =
patientDoctorAppointmentListHospital
.where((elementClinic) =>
elementClinic.filterName == element.projectName)
.toList();
if (doctorByClinic.length != 0) {
patientDoctorAppointmentListHospital[
patientDoctorAppointmentListHospital.indexOf(doctorByClinic[0])]
.patientDoctorAppointmentList
.add(element);
} else {
patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(
filterName: element.projectName,
patientDoctorAppointment: element));
}
} else if (_myDoctorService.patientDoctorAppointmentList.length != 0) {
_myDoctorService.patientDoctorAppointmentList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByClinic = patientDoctorAppointmentListHospital.where((elementClinic) => elementClinic.filterName == element.projectName).toList();
if (doctorByClinic.length != 0) {
patientDoctorAppointmentListHospital[patientDoctorAppointmentListHospital.indexOf(doctorByClinic[0])].patientDoctorAppointmentList.add(element);
} else {
patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(filterName: element.projectName, patientDoctorAppointment: element));
}
setState(ViewState.Idle);
});
} else {
setState(ViewState.Idle);
});
AppToast.showErrorToast(message: TranslationBase.of(AppGlobal.context).askDocEmpty);
}
}
Future getCallRequestTypeLOVs() async {
@ -66,8 +56,7 @@ class AskDoctorViewModel extends BaseViewModel {
Future getCallInfoHoursResult({int projectId, int doctorId}) async {
setState(ViewState.Busy);
await _askDoctorService.getCallInfoHoursResult(
projectId: projectId, doctorId: doctorId);
await _askDoctorService.getCallInfoHoursResult(projectId: projectId, doctorId: doctorId);
if (_askDoctorService.hasError) {
error = _askDoctorService.error;
setState(ViewState.ErrorLocal);
@ -95,11 +84,9 @@ class AskDoctorViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future sendRequestLOV(
{DoctorList doctorList, String requestType, String remark}) async {
Future sendRequestLOV({DoctorList doctorList, String requestType, String remark}) async {
setState(ViewState.BusyLocal);
await _askDoctorService.sendRequestLOV(
doctorList: doctorList, requestType: requestType, remark: remark);
await _askDoctorService.sendRequestLOV(doctorList: doctorList, requestType: requestType, remark: remark);
if (_askDoctorService.hasError) {
error = _askDoctorService.error;
setState(ViewState.ErrorLocal);

@ -38,7 +38,7 @@ class MyBalanceViewModel extends BaseViewModel {
//===========================
double get totalAdvanceBalanceAmount =>
dynamic get totalAdvanceBalanceAmount =>
_myBalanceService.totalAdvanceBalanceAmount;
String get updatedRegisterBloodMessage =>

@ -43,9 +43,8 @@ class _CMCPageState extends State<CMCPage> with SingleTickerProviderStateMixin {
description: TranslationBase.of(context).infoCMC,
imagesInfo: [
ImagesInfo(
imageAr: 'assets/images/Wifi-AR.png',
imageEn: 'assets/images/wifi-EN.png',
isAsset: true)
imageAr: 'https://hmgwebservices.com/Images/MobileApp/CMC/ar/0.png',
imageEn: 'https://hmgwebservices.com/Images/MobileApp/CMC/en/0.png')
],
appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup,
body: Scaffold(

@ -2,7 +2,6 @@ import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -46,9 +45,8 @@ class _HomeHealthCarePageState extends State<HomeHealthCarePage>
appBarTitle: TranslationBase.of(context).homeHealthCare,
imagesInfo: [
ImagesInfo(
imageAr: 'assets/images/Wifi-AR.png',
imageEn: 'assets/images/wifi-EN.png',
isAsset: true)
imageAr: 'https://hmgwebservices.com/Images/MobileApp/HHC/ar/0.png',
imageEn: 'https://hmgwebservices.com/Images/MobileApp/HHC/en/0.png')
],
body: Scaffold(
extendBodyBehindAppBar: true,

@ -16,6 +16,7 @@ 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/ContactUs/findus/findus_page.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
@ -23,6 +24,7 @@ import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart';
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
@ -226,7 +228,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(),
FadePage(page: CovidDrivethruLocation()),
),
imageLocation: 'assets/images/al-habib_online_payment_service_icon.png',
title: TranslationBase.of(context).covid19_driveThrueTest,
@ -247,12 +249,6 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
),
ServicesContainer(
onTap: () => getPharmacyToken(),
// Navigator.push(
// context,
// FadePage(
// page: ParkingPage(),
// ),
// ),
imageLocation: 'assets/images/pharmacy_logo.png',
title: TranslationBase.of(context).pharmacy),
ServicesContainer(
@ -300,14 +296,14 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
imageLocation: 'assets/images/new-design/upcoming_icon_bottom_bar.png',
title: TranslationBase.of(context).todoList,
),
if (projectViewModel.havePrivilege(42))
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: SymptomInfo()),
),
imageLocation: 'assets/images/new-design/body_icon.png',
title: TranslationBase.of(context).symptomCheckerTitle),
// if (projectViewModel.havePrivilege(42))
// ServicesContainer(
// onTap: () => Navigator.push(
// context,
// FadePage(page: SymptomInfo()),
// ),
// imageLocation: 'assets/images/new-design/body_icon.png',
// title: TranslationBase.of(context).symptomCheckerTitle),
if (projectViewModel.havePrivilege(36))
ServicesContainer(
onTap: () => Navigator.push(
@ -340,12 +336,6 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
if (projectViewModel.havePrivilege(38))
ServicesContainer(
onTap: () => Navigator.push(context, FadePage(page: H2OPage())),
// Navigator.push(
// context,
// FadePage(
// page: H2OPageIndexPage(),
// ),
// ),
imageLocation: 'assets/images/new-design/water_icon.png',
title: TranslationBase.of(context).h2o,
),
@ -353,7 +343,9 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(),
FadePage(
page: SmartWatchInstructions()
),
),
imageLocation: 'assets/images/new-design/smartwatch_icon.png',
title: TranslationBase.of(context).smartWatches,

@ -1,12 +1,12 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h20_setting.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/month_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/today_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/week_page.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
@ -49,22 +49,29 @@ class _H2OPageState extends State<H2OPage> with SingleTickerProviderStateMixin {
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).waterTracker,
description: TranslationBase.of(context).h2oInfo,
imagesInfo: [
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/h2o/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/h2o/ar/0.png')
],
showHomeAppBarIcon: false,
baseViewModel: model,
isHelp: true,
appBarIcons: [
IconButton(
icon: Image.asset("assets/images/new-design/setting_gear_icon.png"),
color: Colors.white,
onPressed: () {
Navigator.push(
context,
FadePage(
page: H2oSetting(userDetailModel: model.userDetail, viewModel: model),
),
);
},
),
model.isLogin
? IconButton(
icon: Image.asset("assets/images/new-design/setting_gear_icon.png"),
color: Colors.white,
onPressed: () {
Navigator.push(
context,
FadePage(
page: H2oSetting(userDetailModel: model.userDetail, viewModel: model),
),
);
},
)
: Container(),
],
body: Scaffold(
extendBodyBehindAppBar: true,

@ -56,28 +56,28 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
AuthenticatedUser authenticatedUser;
GetAllSharedRecordsByStatusList selectedPatientFamily;
AdvanceModel advanceModel = AdvanceModel();
List_BloodGroupDetailsModel bloodDetails =
List_BloodGroupDetailsModel(bloodGroup: "A-");
List_BloodGroupDetailsModel bloodDetails = List_BloodGroupDetailsModel(bloodGroup: "A-");
AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser;
var checkedValue = false;
List<ImagesInfo> imagesInfo = List();
ProjectViewModel projectProvider;
@override
void initState() {
imagesInfo.add(
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/ar/0.png'),
);
WidgetsBinding.instance.addPostFrameCallback((_) {
if (projectProvider.isLogin) getAuthUser();
});
super.initState();
getAuthUser();
}
@override
Widget build(BuildContext context) {
imagesInfo.add(
ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/ar/0.png'),
);
ProjectViewModel projectProvider = Provider.of(context);
projectProvider = Provider.of(context);
return BaseView<MyBalanceViewModel>(
onModelReady: (model) => model.getCities(), //model.getHospitals(),
@ -102,22 +102,16 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
height: 12,
),
InkWell(
onTap: () =>
confirmSelectHospitalDialog(model.CitiesModelList),
onTap: () => confirmSelectHospitalDialog(model.CitiesModelList),
//model.hospitals
child: Container(
padding: EdgeInsets.all(12),
width: double.infinity,
height: 65,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Theme.of(context).primaryColor),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(getHospitalName(projectProvider, context)),
Icon(Icons.arrow_drop_down)
],
children: [Texts(getHospitalName(projectProvider, context)), Icon(Icons.arrow_drop_down)],
),
),
),
@ -132,9 +126,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
padding: EdgeInsets.all(12),
width: double.infinity,
height: 65,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Theme.of(context).primaryColor),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -156,9 +148,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
padding: EdgeInsets.all(12),
width: double.infinity,
height: 65,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Theme.of(context).primaryColor),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -175,16 +165,14 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
Row(
children: [
Container(
child: Text(
TranslationBase.of(context).viewTermsConditions),
child: Text(TranslationBase.of(context).viewTermsConditions),
),
SizedBox(
width: MediaQuery.of(context).size.height * 0.10,
),
InkWell(
onTap: () {
Navigator.of(context)
.push(FadePage(page: UserAgreementPage()));
Navigator.of(context).push(FadePage(page: UserAgreementPage()));
},
child: Container(
child: Texts(
@ -220,12 +208,8 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
width: 10,
),
Text(
TranslationBase.of(context)
.iAgreeToTheTermsAndConditions,
style: Theme.of(context).textTheme.subtitle1.copyWith(
color: checkedValue
? Color(0xFFc5272d)
: Colors.black),
TranslationBase.of(context).iAgreeToTheTermsAndConditions,
style: Theme.of(context).textTheme.subtitle1.copyWith(color: checkedValue ? Color(0xFFc5272d) : Colors.black),
),
],
),
@ -247,23 +231,15 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
builder: (_) => AssetGiffyDialog(
title: Text(
"",
style: TextStyle(
fontSize: 22.0,
fontWeight: FontWeight.w600),
style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600),
),
image: Image.asset(
'assets/images/BloodChrt_EN.png'),
buttonCancelText: Text(
TranslationBase.of(context).cancel),
image: Image.asset('assets/images/BloodChrt_EN.png'),
buttonCancelText: Text(TranslationBase.of(context).cancel),
buttonCancelColor: Colors.grey,
onlyCancelButton: true,
));
},
child: Container(
width: 250,
height: 200,
child: Image.asset(
'assets/images/BloodChrt_EN.png')),
child: Container(width: 250, height: 200, child: Image.asset('assets/images/BloodChrt_EN.png')),
),
),
),
@ -293,19 +269,15 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
label: TranslationBase.of(context).save,
onTap: () async {
if (_selectedHospital == null) {
AppToast.showErrorToast(
message: TranslationBase.of(context).selectCity);
AppToast.showErrorToast(message: TranslationBase.of(context).selectCity);
return;
}
bloodDetails.city = projectProvider.isArabic
? _selectedHospital.descriptionN
: _selectedHospital.description;
bloodDetails.city = projectProvider.isArabic ? _selectedHospital.descriptionN : _selectedHospital.description;
bloodDetails.cityCode = _selectedHospital.iD.toString();
bloodDetails.gender = gender == Gender.Male ? 1 : 2;
await model.updateBloodGroup(bloodDetails);
if (model.state == ViewState.Idle) {
AppToast.showSuccessToast(
message: model.updatedRegisterBloodMessage);
AppToast.showSuccessToast(message: model.updatedRegisterBloodMessage);
} else {
AppToast.showErrorToast(message: model.error);
}
@ -325,8 +297,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
setState(() {
if (value == BeneficiaryType.MyAccount) {
_fileTextController.text = model.user.patientID.toString();
advanceModel.depositorName =
model.user.firstName + " " + model.user.lastName;
advanceModel.depositorName = model.user.firstName + " " + model.user.lastName;
} else
_fileTextController.text = "";
@ -453,8 +424,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
);
}
void confirmSelectFamilyDialog(
List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList) {
void confirmSelectFamilyDialog(List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList) {
showDialog(
context: context,
child: SelectPatientFamilyDialog(
@ -463,8 +433,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
onValueSelected: (value) {
setState(() {
selectedPatientFamily = value;
_fileTextController.text =
selectedPatientFamily.patientID.toString();
_fileTextController.text = selectedPatientFamily.patientID.toString();
advanceModel.depositorName = value.patientName;
});
},
@ -538,12 +507,9 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
return "Select Blood Type"; //TranslationBase.of(context).selectBeneficiary;
}
String getHospitalName(
ProjectViewModel projectProvider, BuildContext context) {
String getHospitalName(ProjectViewModel projectProvider, BuildContext context) {
if (_selectedHospital != null)
return projectProvider.isArabic
? _selectedHospital.descriptionN
: _selectedHospital.description;
return projectProvider.isArabic ? _selectedHospital.descriptionN : _selectedHospital.description;
else
return TranslationBase.of(context).selectCity;
// return List_BloodGroupDetailsModel.fromJson(0).city.toString();//"Select City";//TranslationBase.of(context).selectHospital;
@ -558,8 +524,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
getAuthUser() async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
setState(() {
authUser = data;
});

@ -218,7 +218,9 @@ class ConfirmPaymentPage extends StatelessWidget {
authenticatedUser.patientID,
authenticatedUser,
browser,
false);
false,
null,
null);
}
onBrowserLoadStart(String url) {

@ -509,6 +509,8 @@ class _BookSuccessState extends State<BookSuccess> {
authenticatedUser,
widget.browser,
widget.patientShareResponse.isLiveCareAppointment,
null,
null,
widget.patientShareResponse.appointmentDate,
widget.patientShareResponse.appointmentNo,
widget.patientShareResponse.clinicID,

@ -53,6 +53,7 @@ class _DentalComplaintsState extends State<DentalComplaints> {
appBarTitle: "Symptoms",
showNewAppBar: true,
showNewAppBarTitle: true,
isShowDecPage: false,
backgroundColor: CustomColors.appBackgroudGreyColor,
body: Container(
child: !hasDentalPlan

@ -115,6 +115,7 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
widget.doctor.noOfPatientsRate,
"",
),
buttonIcon: 'assets/images/new/Boo_ Appointment.svg',
showConfirmMessageDialog: false,
onTap: () {
Navigator.push(

@ -173,7 +173,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
),
),
Text(
"30",
projectViewModel.isLogin ? projectViewModel.user.age.toString() : "",
style: TextStyle(
fontSize: 15,
letterSpacing: -0.59,
@ -251,6 +251,9 @@ class _SearchByClinicState extends State<SearchByClinic> {
height: 18,
child: DropdownButtonHideUnderline(
child: DropdownButton<String>(
onTap: () {
print("Clicked");
},
key: clinicDropdownKey,
hint: new Text(
TranslationBase.of(context).selectClinic,
@ -270,6 +273,9 @@ class _SearchByClinicState extends State<SearchByClinic> {
item.liveCareServiceID.toString(),
child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
Text(item.clinicDescription),
item.isLiveCareClinicAndOnline
? SvgPicture.asset('assets/images/new-design/video_icon_green_right.svg', height: 12, width: 12, fit: BoxFit.cover)
: Container(),
]),
);
}).toList(),
@ -448,8 +454,10 @@ class _SearchByClinicState extends State<SearchByClinic> {
page: LiveCareBookAppointment(clinicName: "Family Medicine", liveCareClinicID: dropdownValue.split("-")[2], liveCareServiceID: dropdownValue.split("-")[3]),
),
).then((value) {
print(value);
if (value == "false") dropdownValue = "";
setState(() {
print(value);
if (value == "false") dropdownValue = null;
});
if (value == "livecare") {
Navigator.push(context, FadePage(page: LiveCareHome()));
}
@ -517,13 +525,20 @@ class _SearchByClinicState extends State<SearchByClinic> {
FadePage(
page: DentalComplaints(searchInfo: searchInfo),
),
);
).then((value) {
setState(() {
dropdownValue = null;
});
});
}
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
isProjectLoaded = false;
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital)))
.then((value) {
setState(() {
dropdownValue = null;
});
getProjectsList();
});
}

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
@ -9,6 +10,7 @@ import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart';
import '../DoctorProfile.dart';
@ -21,8 +23,11 @@ class DoctorView extends StatelessWidget {
DoctorView({@required this.doctor, @required this.isLiveCareAppointment, this.isShowFlag = true, this.onTap});
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return InkWell(
onTap: onTap ??
() {
@ -69,8 +74,8 @@ class DoctorView extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
if (doctor.clinicName != null) myRichText(TranslationBase.of(context).clinic + ":", doctor.clinicName),
if (doctor.projectName != null) myRichText(TranslationBase.of(context).hospital + ":", doctor.projectName),
if (doctor.clinicName != null) myRichText(TranslationBase.of(context).clinic + ":", doctor.clinicName, projectViewModel.isArabic),
if (doctor.projectName != null) myRichText(TranslationBase.of(context).hospital + ":", doctor.projectName, projectViewModel.isArabic),
if (doctor.speciality != null)
Text(
getDoctorSpeciality(this.doctor.speciality).trim(),
@ -135,6 +140,8 @@ class DoctorView extends StatelessWidget {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}

@ -1,6 +1,5 @@
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -18,8 +17,7 @@ class ChildVaccinesPage extends StatefulWidget {
_ChildVaccinesPageState createState() => _ChildVaccinesPageState();
}
class _ChildVaccinesPageState extends State<ChildVaccinesPage>
with SingleTickerProviderStateMixin {
class _ChildVaccinesPageState extends State<ChildVaccinesPage> with SingleTickerProviderStateMixin {
TextEditingController titleController = TextEditingController();
var checkedValue = false;
String addEmail = "";
@ -30,9 +28,17 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
onModelReady: (model) => model.getUserInformationRequestOrders(),
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
baseViewModel: model,
isShowDecPage: true,
description: TranslationBase.of(context).childVaccineInfo,
imagesInfo: [
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/en/0.png',
imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/ar/0.png'),
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/en/1.png',
imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/ar/1.png')
],
appBarTitle: TranslationBase.of(context).vaccination,
//TranslationBase.of(context).advancePayment,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Column(
@ -80,16 +86,14 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
fillColor: Colors.red,
hintText: model.user.emailAddress,
hintText: model.user != null ? model.user.emailAddress : "",
controller: titleController,
fontSize: 20,
hintColor: Colors.black,
fontWeight: FontWeight.w600,
onChanged: (text) {
addEmail = text;
model.user.emailAddress == addEmail
? checkedValue = false
: checkedValue = true;
model.user.emailAddress == addEmail ? checkedValue = false : checkedValue = true;
},
validator: (value) {
if (value == null) {
@ -119,8 +123,7 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
//
onTap: () {
model.user.emailAddress = addEmail.toString();
AppToast.showSuccessToast(
message: TranslationBase.of(context).updateEmailMsg);
AppToast.showSuccessToast(message: TranslationBase.of(context).updateEmailMsg);
// bloodDetails.city=_selectedHospital.toString();
// bloodDetails.

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -37,182 +38,89 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
builder: (_, model, widget) => AppScaffold(
baseViewModel: model,
isShowDecPage: false,
body: SingleChildScrollView(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Stack(
body: Column(
children: [
Expanded(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 70,
),
Container(
width: double.infinity,
height: 230,
Text(
TranslationBase.of(context).instructions,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
),
SizedBox(height: 20),
Text(
TranslationBase.of(context).selectHospitalDec + " :",
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
),
SizedBox(height: 20),
ListView.separated(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
separatorBuilder: (context, index) => SizedBox(height: 14),
itemCount: model.LiveChatModelList.length,
itemBuilder: (context, index) => InkWell(
onTap: () {
setState(() {
tappedIndex = index;
chat =
"http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=${model.user.firstName}&PatientID=${model.user.patientID}&MobileNo=${model.user.mobileNumber}&Language=${projectViewModel.currentLanguage}&WorkGroup=${model.LiveChatModelList[index].value}";
});
},
child: Container(
padding: EdgeInsets.only(right: 12, left: 18, top: 16, bottom: 16),
decoration: BoxDecoration(
image: DecorationImage(
image: ExactAssetImage(
'assets/images/dashboard_top_bg.png'),
fit: BoxFit.cover),
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: projectViewModel.isArabic? 10:20,
),
Texts(
TranslationBase.of(context).instructions,
color: Colors.white,
textAlign: TextAlign.start,
),
SizedBox(
height:projectViewModel.isArabic? 8:25,
),
Texts(
TranslationBase.of(context)
.selectHospitalDec +
" :",
color: Colors.white,
fontWeight: FontWeight.w700,
textAlign: TextAlign.start,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
blurRadius: 27,
offset: Offset(0, -3),
),
],
),
color: tappedIndex == index ? Color(0xff28323A).withOpacity(.7) : Colors.white),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Expanded(
child: Text(
model.LiveChatModelList[index]?.projectName ?? "",
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: tappedIndex == index ? Colors.white : Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
),
),
Icon(
Icons.arrow_forward_ios,
color: tappedIndex == index ? Colors.white : Colors.black,
),
],
),
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.85,
),
SizedBox(
height: 100,
),
],
),
Positioned(
left: 13,
right: 13,
top: 200,
child: Container(
width: double.maxFinite,
child: Column(
children: [
...List.generate(
model.LiveChatModelList.length,
(index) => Container(
margin: EdgeInsets.only(
left: 0, right: 0, bottom: 20),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
border: Border.all(
color: Colors.white, width: 0.5),
borderRadius: BorderRadius.all(
Radius.circular(5)),
color: tappedIndex == index
? Theme.of(context).primaryColor
: Colors.white,
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
InkWell(
onTap: () {
setState(() {
tappedIndex = index;
chat = "http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=${model.user.firstName}&PatientID=${model.user.patientID}&MobileNo=${model.user.mobileNumber}&Language=${projectViewModel.currentLanguage}&WorkGroup=${model.LiveChatModelList[index].value}";
});
},
child: Row(
mainAxisAlignment:
MainAxisAlignment
.spaceAround,
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
SizedBox(
width: 20,
),
Expanded(
child: Container(
margin:
EdgeInsets.only(
left: 5,
right: 5),
child: Texts(
'${model.LiveChatModelList[index].projectName}',
color:
tappedIndex ==
index
? Colors
.white
: Colors
.black,
textAlign: TextAlign
.center,
))),
//model.cOCItemList[index].cOCTitl
IconButton(
icon: Icon(
Icons.arrow_forward_ios,
color:
tappedIndex == index
? Colors.white
: Colors.black,
),
tooltip: '',
onPressed: () {
setState(() {});
},
),
],
),
)
],
),
),
)),
],
),
),
),
],
),
Container(
height: MediaQuery.of(context).size.height * 0.20,
width: double.maxFinite,
)
],
),
),
),
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
padding: EdgeInsets.all(8.0),
child: Center(
child: Container(
height: MediaQuery.of(context).size.height * 0.07,
width: MediaQuery.of(context).size.width * 0.8,
child: SecondaryButton(
label: TranslationBase.of(context).start,
loading: model.state == ViewState.BusyLocal,
textColor: Colors.white,
disabled: chat.isEmpty,
onTap: () {
launch(chat);
},
Container(
color: Colors.white,
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton(
TranslationBase.of(context).start,
chat.isEmpty ? null : () => {launch(chat)},
color: Color(0xffD02127),
textColor: chat.isEmpty ? Color(0xff000000) : Colors.white,
disabledColor: Color(0xffEAEAEA),
),
),
),
],
),
),
);

@ -2,6 +2,7 @@ import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart';
import 'package:diplomaticquarterapp/theme/colors.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';
@ -15,17 +16,19 @@ class LiveChatPage extends StatefulWidget {
_LiveChatPageState createState() => _LiveChatPageState();
}
class _LiveChatPageState extends State<LiveChatPage>
with SingleTickerProviderStateMixin {
class _LiveChatPageState extends State<LiveChatPage> with SingleTickerProviderStateMixin {
TabController _tabController;
List<ImagesInfo> imagesInfo = List();
@override
void initState() {
super.initState();
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/0.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/1.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/2.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/2.png'));
imagesInfo
.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/0.png'));
imagesInfo
.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/1.png'));
imagesInfo
.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/2.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/2.png'));
_tabController = TabController(length: 2, vsync: this);
}
@ -44,84 +47,42 @@ class _LiveChatPageState extends State<LiveChatPage>
title: TranslationBase.of(context).liveChat,
description: TranslationBase.of(context).infoChat,
appBarTitle: TranslationBase.of(context).service,
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(
preferredSize: Size.fromHeight(65.0),
child: Stack(
children: <Widget>[
Positioned(
bottom: 1,
left: 0,
right: 0,
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
child: Container(
color: Theme.of(context)
.scaffoldBackgroundColor
.withOpacity(0.8),
height: 70.0,
),
),
),
Center(
child: Container(
height: 60.0,
margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 0.92, // 0.9,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Theme.of(context).dividerColor,
width: 0.9), //width: 0.7
),
color: Colors.white),
child: Center(
child: TabBar(
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Theme.of(context).primaryColor,
labelColor: Theme.of(context).primaryColor,
labelPadding: EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: Texts(TranslationBase.of(context).hospitals),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: Texts(TranslationBase.of(context).pharmacies),
),
),
],
),
),
),
),
],
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGrey2Color,
body: Column(
children: <Widget>[
TabBar(
controller: _tabController,
indicatorWeight: 3.0,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Color(0xff2B353E),
unselectedLabelColor: Color(0xff575757),
labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
labelStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
unselectedLabelStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
tabs: [Text(TranslationBase.of(context).hospitals), Text(TranslationBase.of(context).pharmacies)],
),
),
body: Column(
children: <Widget>[
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
HospitalsLiveChatPage(), //SendFeedbackPage(),
PhamaciesLiveChatPage()
//StatusFeedbackPage()
],
),
)
],
),
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
HospitalsLiveChatPage(), //SendFeedbackPage(),
PharmaciesLiveChatPage()
//StatusFeedbackPage()
],
),
)
],
),
);
}

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
@ -13,21 +14,8 @@ import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
class PhamaciesLiveChatPage extends StatefulWidget {
@override
_PhamaciesLiveChatPageState createState() => _PhamaciesLiveChatPageState();
}
class _PhamaciesLiveChatPageState extends State<PhamaciesLiveChatPage> {
int tappedIndex;
String chat;
@override
void initState() {
super.initState();
tappedIndex = -1;
chat = "";
}
class PharmaciesLiveChatPage extends StatelessWidget {
PharmaciesLiveChatPage({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
@ -36,53 +24,43 @@ class _PhamaciesLiveChatPageState extends State<PhamaciesLiveChatPage> {
builder: (_, model, widget) => AppScaffold(
baseViewModel: model,
isShowDecPage: false,
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Column(
children: [
SizedBox(
height: 20,
body: Column(
children: [
Expanded(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 20),
Text(
TranslationBase.of(context).instructions,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
),
],
),
Container(
width: double.infinity,
height: 200,
child: Texts(
TranslationBase.of(context).instructionsPharmacies,
color: Colors.black,
textAlign: TextAlign.center,
),
),
///////////
SizedBox(
height: 100,
),
],
),
),
),
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.11,
width: double.infinity,
padding: EdgeInsets.all(8.0),
child: Center(
child: Container(
height: MediaQuery.of(context).size.height * 0.7,
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
label: TranslationBase.of(context).start,
loading: model.state == ViewState.BusyLocal,
onTap: () {
print("chat=" + chat);
Container(
color: Colors.white,
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton(
TranslationBase.of(context).start,
() {
String chat;
chat =
"http://chat.dshmg.com:7788/EPharmacyChat/EIndex.aspx?CustomerID=undefined&Name=${model.user.firstName}&MobileNo=${model.user.mobileNumber}&Language=${projectViewModel.isArabic? 1:2}";
"http://chat.dshmg.com:7788/EPharmacyChat/EIndex.aspx?CustomerID=undefined&Name=${model.user.firstName}&MobileNo=${model.user.mobileNumber}&Language=${projectViewModel.isArabic ? 1 : 2}";
launch(chat);
},
color: Color(0xffD02127),
textColor: Colors.white,
disabledColor: Color(0xffEAEAEA),
),
),
),
],
),
),
);

@ -195,178 +195,5 @@ class _HospitalsPageState extends State<HospitalsPage> {
],
),
);
AppScaffold(
isShowDecPage: false,
body: SingleChildScrollView(
child: Container(
// margin: EdgeInsets.only(left: 15,right: 15,top: 70),
margin: EdgeInsets.only(left: 15, right: 15, top: 70),
child: Column(
children: [
...List.generate(
widget.findusHospitalModelList.length,
(index) => Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
border: Border.all(color: Colors.white, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(5)),
color: Colors.white,
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
InkWell(
onTap: () {
showDialog(
context: context,
builder: (_) => AssetGiffyDialog(
title: Text(
widget.findusHospitalModelList[index].locationName,
style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600),
),
image: Image.network(
widget.findusHospitalModelList[index].projectImageURL.toString(),
fit: BoxFit.cover,
),
buttonCancelText: Text('cancel'),
buttonCancelColor: Colors.grey,
onlyCancelButton: true,
));
},
child: Container(width: 70, height: 70, child: Image.network(widget.findusHospitalModelList[index].projectImageURL.toString())),
),
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.only(left: 5, right: 5, top: 10, bottom: 1),
child: Texts(
'${widget.findusHospitalModelList[index].locationName}',
textAlign: TextAlign.start,
))), //model.cOCItemList[index].cOCTitl
Expanded(
flex: 2,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
IconButton(
icon: Icon(
Icons.location_on,
color: Theme.of(context).primaryColor,
size: 35,
),
// icon: new Image.asset(
// 'assets/images/new-design/navigate.png'),
tooltip: '',
onPressed: () {
setState(() {
MapsLauncher.launchCoordinates(double.parse(widget.findusHospitalModelList[index].latitude),
double.parse(widget.findusHospitalModelList[index].longitude), widget.findusHospitalModelList[index].locationName);
});
},
),
IconButton(
icon: Icon(
Icons.phone,
color: Theme.of(context).primaryColor,
size: 35,
),
// icon: new Image.asset(
// 'assets/images/new-design/call.png'),
tooltip: '',
onPressed: () {
setState(() {
// _volume += 10;
launch("tel://" + widget.findusHospitalModelList[index].phoneNumber);
});
},
),
],
),
),
],
),
),
],
),
// Texts('${model.FindusHospitalModelList[index].locationName}'),
Divider(
height: 4.5,
color: Colors.grey[500],
)
],
),
),
)),
SizedBox(
height: 8,
),
Container(
width: double.infinity,
height: 100,
color: Colors.white,
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
IconButton(
icon: new Image.asset('assets/images/new-design/youtube.png'),
iconSize: 70,
tooltip: 'Youtube',
onPressed: () {
setState(() {
launch("https://www.youtube.com/c/DrsulaimanAlhabibHospitals");
});
},
),
IconButton(
icon: new Image.asset('assets/images/new-design/linkedin.png'),
tooltip: 'LinkedIn',
iconSize: 70,
onPressed: () {
setState(() {
launch("https://www.linkedin.com/company/drsulaiman-alhabib-medical-group");
});
},
),
IconButton(
icon: new Image.asset('assets/images/new-design/twitter.png'),
tooltip: 'Twitter',
iconSize: 70,
onPressed: () {
setState(() {
launch("https://twitter.com/HMG");
});
},
),
IconButton(
icon: new Image.asset('assets/images/new-design/facebook.png'),
tooltip: 'facebook',
iconSize: 70,
onPressed: () {
setState(() {
launch("https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn");
});
},
),
],
),
),
],
),
),
),
);
}
}

@ -38,7 +38,12 @@ class CardCommonContact extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Image.asset(this.image, width: 42.0, height: 42.0),
Image.asset(
this.image,
width: 42.0,
height: 42.0,
color: Color(0xff2E303A),
),
Text(
text + "${subText.isEmpty ? "" : "\n$subText"}",
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16),

@ -152,6 +152,7 @@ class CovidDirveThruQuestionsState extends State<CovidDirveThruQuestions> {
service.getCovidPaymentInformation(context, int.parse(projectID), widget.proceduresList[0].procedureID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
Navigator.push(
context,
FadePage(

@ -14,7 +14,6 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:maps_launcher/maps_launcher.dart';
import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'covid-dirvethru-questions.dart';
@ -34,15 +33,14 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
String projectID = "";
List<ImagesInfo> imagesInfo = List();
DriveThroughTestingCenterModel selectedProject;
ProjectViewModel projectViewModel;
@override
void initState() {
imagesInfo.add(
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'),
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'),
);
WidgetsBinding.instance.addPostFrameCallback((_) {
if (projectViewModel.isLogin) {
@ -56,9 +54,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
imagesInfo.add(ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png',
imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'));
return AppScaffold(
appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true,
@ -72,31 +68,17 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Container(
alignment: projectViewModel.isArabic
? Alignment.centerRight
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).resultHeader,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 22.0,
color: Colors.black)),
alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
child: Text(TranslationBase.of(context).resultHeader, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 22.0, color: Colors.black)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(TranslationBase.of(context).covidInfo,
style: TextStyle(fontSize: 16.0, color: Colors.black)),
child: Text(TranslationBase.of(context).covidInfo, style: TextStyle(fontSize: 16.0, color: Colors.black)),
),
Container(
margin: EdgeInsets.only(top: 20.0),
alignment: projectViewModel.isArabic
? Alignment.centerRight
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18.0,
letterSpacing: 0.8,
color: Colors.grey[700])),
alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0, letterSpacing: 0.8, color: Colors.grey[700])),
),
Container(
height: 60.0,
@ -112,18 +94,18 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
width: MediaQuery.of(context).size.width,
margin: EdgeInsets.only(top: 15.0),
child: DropdownButtonHideUnderline(
child: DropdownButton<String>(
child: DropdownButton<DriveThroughTestingCenterModel>(
hint: new Text(TranslationBase.of(context).selectAddress),
value: projectDropdownValue,
items: projectsList.map((item) {
return new DropdownMenuItem<String>(
value: item.iD.toString(),
value: selectedProject,
items: projectsList.map((DriveThroughTestingCenterModel item) {
return new DropdownMenuItem<DriveThroughTestingCenterModel>(
value: item,
child: new Text(item.projectName),
);
}).toList(),
onChanged: (newValue) {
setState(() {
projectDropdownValue = newValue;
selectedProject = newValue;
setProjectLocation(newValue);
});
},
@ -132,15 +114,8 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
isLocationSelected
? Container(
margin: EdgeInsets.only(top: 15.0),
alignment: projectViewModel.isArabic
? Alignment.centerRight
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18.0,
letterSpacing: 0.8,
color: Colors.black)),
alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0, letterSpacing: 0.8, color: Colors.black)),
)
: Container(),
isLocationSelected
@ -149,16 +124,15 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
decoration: BoxDecoration(
border: Border.all(color: Colors.grey[400], width: 1.0),
),
child: Image.network(
"https://maps.googleapis.com/maps/api/staticmap?center=" +
this.projectLat +
"," +
this.projectLong +
"&zoom=15&size=800x400&maptype=roadmap&markers=color:red%7C" +
this.projectLat +
"," +
this.projectLong +
"&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"),
child: Image.network("https://maps.googleapis.com/maps/api/staticmap?center=" +
this.projectLat +
"," +
this.projectLong +
"&zoom=15&size=800x400&maptype=roadmap&markers=color:red%7C" +
this.projectLat +
"," +
this.projectLong +
"&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"),
)
: SizedBox(
height: MediaQuery.of(context).size.height * 0.35,
@ -184,8 +158,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () {
getDirections();
},
child: Text(TranslationBase.of(context).getDirections,
style: TextStyle(fontSize: 18.0)),
child: Text(TranslationBase.of(context).getDirections, style: TextStyle(fontSize: 18.0)),
),
),
),
@ -202,8 +175,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth:
MediaQuery.of(context).size.width * 0.7,
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
@ -213,8 +185,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () {
back();
},
child: Text(TranslationBase.of(context).back,
style: TextStyle(fontSize: 18.0)),
child: Text(TranslationBase.of(context).back, style: TextStyle(fontSize: 18.0)),
),
),
),
@ -227,8 +198,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth:
MediaQuery.of(context).size.width * 0.7,
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
@ -238,8 +208,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () {
next();
},
child: Text(TranslationBase.of(context).next,
style: TextStyle(fontSize: 18.0)),
child: Text(TranslationBase.of(context).next, style: TextStyle(fontSize: 18.0)),
),
),
),
@ -259,22 +228,17 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
getDirections() {
if (isLocationSelected) {
MapsLauncher.launchCoordinates(double.parse(projectLat),
double.parse(projectLong), this.projectName);
MapsLauncher.launchCoordinates(double.parse(projectLat), double.parse(projectLong), this.projectName);
} else {
Utils.showErrorToast(
"Please select address from the dropdown menu to get directions");
Utils.showErrorToast("Please select address from the dropdown menu to get directions");
}
}
next() {
if (isLocationSelected) {
Navigator.push(
context,
FadePage(page: CovidDirveThruQuestions(projectId: projectID, proceduresList: proceduresList,)));
Navigator.push(context, FadePage(page: CovidDirveThruQuestions(projectId: projectID, proceduresList: proceduresList)));
} else {
Utils.showErrorToast(
"Please select address from the dropdown menu to continue");
Utils.showErrorToast("Please select address from the dropdown menu to continue");
}
}
@ -282,34 +246,25 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
Navigator.of(context).popAndPushNamed(HOME);
}
setProjectLocation(newValue) {
print(newValue);
setProjectLocation(DriveThroughTestingCenterModel newValue) {
setState(() {
this.projectLat =
projectsList[(int.parse(newValue) - 1)].latitude.toString();
this.projectLong =
projectsList[(int.parse(newValue) - 1)].longitude.toString();
this.projectName = projectsList[(int.parse(newValue) - 1)].projectName;
this.projectID =
projectsList[(int.parse(newValue) - 1)].projectID.toString();
this.projectLat = newValue.latitude.toString();
this.projectLong = newValue.longitude.toString();
this.projectName = newValue.projectName;
this.projectID = newValue.projectID.toString();
isLocationSelected = true;
});
}
getPaymentInfo(BuildContext context, String projectID) {
CovidDriveThruService service = new CovidDriveThruService();
CovidPaymentInfoResponse covidPaymentInfoResponse =
new CovidPaymentInfoResponse();
CovidPaymentInfoResponse covidPaymentInfoResponse = new CovidPaymentInfoResponse();
GifLoaderDialogUtils.showMyDialog(context);
service
.getCovidPaymentInformation(
context, int.parse(projectID), proceduresList[0].procedureID)
.then((res) {
service.getCovidPaymentInformation(context, int.parse(projectID), proceduresList[0].procedureID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
covidPaymentInfoResponse =
CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
});
Navigator.push(
context,
@ -329,8 +284,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context);
CovidTestProceduresResponse covidTestProceduresResponse =
new CovidTestProceduresResponse();
CovidTestProceduresResponse covidTestProceduresResponse = new CovidTestProceduresResponse();
service.getCovidTestProceduresList(context).then((res) {
if (res['MessageStatus'] == 1) {

@ -30,7 +30,6 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
@override
void initState() {
print(widget.proceduresList[0].procedureName);
widget.selectedProcedure = widget.proceduresList[0];
super.initState();
}
@ -336,14 +335,6 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
widget.covidPaymentInfoResponse =
CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
});
// Navigator.push(
// context,
// FadePage(
// page: CovidPaymentDetails(
// covidPaymentInfoResponse: covidPaymentInfoResponse,
// projectID: int.parse(projectID),
// proceduresList: proceduresList,
// )));
} else {}
}).catchError((err) {
print(err);

@ -191,6 +191,8 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
authenticatedUser,
widget.browser,
widget.patientShareResponse.isLiveCareAppointment,
null,
null,
widget.patientShareResponse.appointmentDate,
widget.patientShareResponse.appointmentNo,
widget.patientShareResponse.clinicID,

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/er/TriageInformationRequest.dart
import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -44,36 +45,39 @@ class _DdServicesPageState extends State<DdServicesPage> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Scaffold(
appBar: AppBar(
elevation: 0,
textTheme: TextTheme(
headline6: TextStyle(
color: Theme.of(context).textTheme.headline1.color,
fontWeight: FontWeight.bold),
),
title: Text(
'ED Online',
style: TextStyle(
fontWeight: FontWeight.bold,
color: Theme.of(context).textTheme.headline1.color,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
// bold: true,
// color: Colors.white,
),
leading: Builder(
builder: (BuildContext context) {
return IconButton(
icon: Icon(Icons.arrow_back),
color: Theme.of(context).textTheme.headline1.color,
onPressed: () {
showConfirmMessage(context);
},
);
},
),
centerTitle: true,
),
return AppScaffold(
appBarTitle: 'ED Online',
isShowDecPage: true,
isShowAppBar: true,
// appBarTitle: AppBar(
// elevation: 0,
// textTheme: TextTheme(
// headline6: TextStyle(
// color: Theme.of(context).textTheme.headline1.color,
// fontWeight: FontWeight.bold),
// ),
// title: Text(
// 'ED Online',
// style: TextStyle(
// fontWeight: FontWeight.bold,
// color: Theme.of(context).textTheme.headline1.color,
// fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
// // bold: true,
// // color: Colors.white,
// ),
// leading: Builder(
// builder: (BuildContext context) {
// return IconButton(
// icon: Icon(Icons.arrow_back),
// color: Theme.of(context).textTheme.headline1.color,
// onPressed: () {
// showConfirmMessage(context);
// },
// );
// },
// ),
// centerTitle: true,
// ),
body: PageView(
physics: NeverScrollableScrollPhysics(),
controller: pageController,

@ -44,7 +44,7 @@ class _ErOptionsState extends State<ErOptions> {
return AppScaffold(
isShowAppBar: widget.isAppbar,
appBarTitle: TranslationBase.of(context).bookAppo,
appBarTitle: TranslationBase.of(context).emergencyServices,
isShowDecPage: false,
showNewAppBar: true,
showNewAppBarTitle: true,

@ -1,16 +1,15 @@
import 'package:diplomaticquarterapp/core/viewModels/er/near_hospital_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/core/model/er/projectavgerwaitingtime.dart';
import 'package:diplomaticquarterapp/core/service/er/er_service.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart';
import 'widgets/card_position.dart';
class NearestEr extends StatelessWidget {
class NearestEr extends StatefulWidget {
static const String _url = "assets/images/";
int appointmentNo;
@ -18,92 +17,89 @@ class NearestEr extends StatelessWidget {
NearestEr({this.appointmentNo, this.projectID});
@override
_NearestErState createState() => _NearestErState();
}
class _NearestErState extends State<NearestEr> {
List<ProjectAvgERWaitingTime> projectAvgERWaitingTimeModelList = List();
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) => getERList());
super.initState();
}
@override
Widget build(BuildContext context) {
var size = MediaQuery.of(context).size;
final double itemHeight = (size.height - kToolbarHeight - 24) / 2;
final double itemWidth = size.width / 2;
return BaseView<NearHospitalViewModel>(
onModelReady: appointmentNo != null && projectID != null
? (model) => model.getProjectAvgERWaitingTimeOrders(
id: appointmentNo, projectID: projectID)
: (model) => model.getProjectAvgERWaitingTimeOrders(),
builder: (_, mode, widget) => AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).NearestEr,
baseViewModel: mode,
body: mode.ProjectAvgERWaitingTimeModeList.length > 0
? Container(
child: ListView(
children: <Widget>[
Text(
"${TranslationBase.of(context).NearestErDesc}",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 18.0,
letterSpacing: 1.0,
fontWeight: FontWeight.w900,
color: new Color(0xFF60686b))),
Container(
margin: EdgeInsets.fromLTRB(2.0, 10.0, 0.0, 10.0),
child: GridView.count(
crossAxisCount: 2,
childAspectRatio: (itemWidth / itemWidth),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
controller:
new ScrollController(keepScrollOffset: false),
shrinkWrap: true,
padding: const EdgeInsets.all(4.0),
children: List.generate(7, (index) {
return Container(
child: CardPosition(
waitingTime: mode
.ProjectAvgERWaitingTimeModeList[index]
.avgTimeInHHMM
.toString(),
text: mode
.ProjectAvgERWaitingTimeModeList[index]
.projectName
.toString(),
image:
'assets/images/new-design/find_us_icon.png',
subText: '${mode.ProjectAvgERWaitingTimeModeList[index].distanceInKilometers ?? 0.0} ${TranslationBase.of(context).km_}',
type: mode
.ProjectAvgERWaitingTimeModeList[index].iD
.toString(),
telephone: mode
.ProjectAvgERWaitingTimeModeList[index]
.phoneNumber
.toString(),
networkImage: mode
.ProjectAvgERWaitingTimeModeList[index]
.projectImageURL
.toString(),
latitude: mode
.ProjectAvgERWaitingTimeModeList[index]
.latitude,
longitude: mode
.ProjectAvgERWaitingTimeModeList[index]
.longitude,
projectname: mode
.ProjectAvgERWaitingTimeModeList[index]
.projectName,
cardSize: itemWidth,
),
);
}),
),
return AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).NearestEr,
body: projectAvgERWaitingTimeModelList.length > 0
? Container(
child: ListView(
children: <Widget>[
Text("${TranslationBase.of(context).NearestErDesc}",
textAlign: TextAlign.center, style: TextStyle(fontSize: 18.0, letterSpacing: 1.0, fontWeight: FontWeight.w900, color: new Color(0xFF60686b))),
Container(
margin: EdgeInsets.fromLTRB(2.0, 10.0, 0.0, 10.0),
child: GridView.count(
crossAxisCount: 2,
childAspectRatio: (itemWidth / itemWidth),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
controller: new ScrollController(keepScrollOffset: false),
shrinkWrap: true,
padding: const EdgeInsets.all(4.0),
children: List.generate(7, (index) {
return Container(
child: CardPosition(
waitingTime: projectAvgERWaitingTimeModelList[index].avgTimeInHHMM.toString(),
text: projectAvgERWaitingTimeModelList[index].projectName.toString(),
image: 'assets/images/new-design/find_us_icon.png',
subText: '${projectAvgERWaitingTimeModelList[index].distanceInKilometers ?? 0.0} ${TranslationBase.of(context).km_}',
type: projectAvgERWaitingTimeModelList[index].iD.toString(),
telephone: projectAvgERWaitingTimeModelList[index].phoneNumber.toString(),
networkImage: projectAvgERWaitingTimeModelList[index].projectImageURL.toString(),
latitude: projectAvgERWaitingTimeModelList[index].latitude,
longitude: projectAvgERWaitingTimeModelList[index].longitude,
projectname: projectAvgERWaitingTimeModelList[index].projectName,
cardSize: itemWidth,
),
);
}),
),
],
),
)
: Center(
child: Texts('No Data'),
),
],
),
),
)
: Center(
child: Texts('No Data'),
),
);
}
getERList() async {
GifLoaderDialogUtils.showMyDialog(context);
ErService service = new ErService();
service.getProjectAvgERWaitingTimeOrders().then((response) {
if (response['MessageStatus'] == 1) {
setState(() {
projectAvgERWaitingTimeModelList.clear();
response['List_ProjectAvgERWaitingTime'].forEach((vital) {
projectAvgERWaitingTimeModelList.add(ProjectAvgERWaitingTime.fromJson(vital));
});
});
GifLoaderDialogUtils.hideDialog(context);
} else {}
}).catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
});
}
}

@ -1,4 +1,4 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-logs-page.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-request-page.dart';
@ -8,13 +8,12 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class RRTMainScreen extends StatefulWidget{
class RRTMainScreen extends StatefulWidget {
@override
State<StatefulWidget> createState() => RRTMainScreenState();
}
class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProviderStateMixin{
class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProviderStateMixin {
int currentIndex = 0;
TabController tabController;
PageController pageController = PageController(initialPage: 0, keepPage: true);
@ -22,84 +21,85 @@ class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProvider
RRTViewModel viewModel;
bool loadingData;
List<ImagesInfo> imagesInfo = List();
@override
void initState() {
super.initState();
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/RRT/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/RRT/ar/0.png'));
tabController = TabController(length: 2, vsync: this);
}
TranslationBase localize;
@override
Widget build(BuildContext context) {
localize = TranslationBase.of(context);
return AppScaffold(
appBarTitle: localize.rapidResponseTeam,
isShowAppBar: true,
body: BaseView<RRTViewModel>(
onModelReady: (vm) async {
viewModel = vm;
loadingData = true;
await vm.loadRequiredData().then((value){
}).whenComplete(() => setState(() => loadingData = false));
},
builder: (ctx, vm, widget) => content(),
)
);
appBarTitle: localize.rapidResponseTeam,
isShowAppBar: true,
description: TranslationBase.of(context).rrtDDetails,
imagesInfo: imagesInfo,
body: BaseView<RRTViewModel>(
onModelReady: (vm) async {
viewModel = vm;
loadingData = true;
await vm.loadRequiredData().then((value) {}).whenComplete(() => setState(() => loadingData = false));
},
builder: (ctx, vm, widget) => content(),
));
}
Widget content(){
if(loadingData == true){
Widget content() {
if (loadingData == true) {
return Center(child: CircularProgressIndicator());
// else if(viewModel.state == ViewState.Error)
}else if(viewModel.rrtServiceData != null && viewModel.rrtServiceData.servicePrice != null){
} else if (viewModel.rrtServiceData != null && viewModel.rrtServiceData.servicePrice != null) {
return Column(
children: [
tabBar(),
Expanded(
child: contentPager()
)
],
children: [tabBar(), Expanded(child: contentPager())],
);
}else{
} else {
return Container(
alignment: Alignment.center,
child: Text(localize.somethingWentWrongTryLater, style: TextStyle(color: Colors.red), maxLines: 5,),
child: Text(
localize.somethingWentWrongTryLater,
style: TextStyle(color: Colors.red),
maxLines: 5,
),
);
}
}
Widget tabBar() => Container(
margin: EdgeInsets.all(15),
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)),
child: TabBar(
onTap: onPageChanged,
indicatorWeight: 3,
indicatorColor: Color(0xFFc5272d),
isScrollable: false,
controller: tabController,
indicatorSize: TabBarIndicatorSize.label,
tabs: [
margin: EdgeInsets.all(15),
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)),
child: TabBar(onTap: onPageChanged, indicatorWeight: 3, indicatorColor: Color(0xFFc5272d), isScrollable: false, controller: tabController, indicatorSize: TabBarIndicatorSize.label, tabs: [
Tab(
child: Text(localize.rapidResponseTeam, style: TextStyle(color: Theme.of(context).appBarTheme.color),),
child: Text(
localize.rapidResponseTeam,
style: TextStyle(color: Theme.of(context).appBarTheme.color),
),
),
Tab(
child: Text(localize.orderLog, style: TextStyle(color: Theme.of(context).appBarTheme.color),),
child: Text(
localize.orderLog,
style: TextStyle(color: Theme.of(context).appBarTheme.color),
),
),
]
),
);
]),
);
Widget contentPager() => PageView(
onPageChanged: onPageChanged,
controller: pageController,
children: [
RRTRequestPage(servicePrice: viewModel.rrtServiceData.servicePrice, pendingOrders: viewModel.rrtServiceData.pendingOrders),
RRTLogPage(orders: viewModel.rrtServiceData.completedOrders),
],
);
onPageChanged: onPageChanged,
controller: pageController,
children: [
RRTRequestPage(servicePrice: viewModel.rrtServiceData.servicePrice, pendingOrders: viewModel.rrtServiceData.pendingOrders),
RRTLogPage(orders: viewModel.rrtServiceData.completedOrders),
],
);
void onPageChanged(int index) {
pageController.animateToPage(index, duration: Duration(milliseconds: 200), curve: Curves.easeInOut);

@ -45,6 +45,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
List<DoctorRateDetails> doctorDetailsList = List();
ToDoCountProviderModel toDoProvider;
ProjectViewModel projectViewModel;
DoctorList doctorList = new DoctorList();
@ -73,7 +74,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
projectViewModel = Provider.of(context);
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
@ -158,7 +159,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
child: TabBarView(
physics: NeverScrollableScrollPhysics(),
children: [
AppointmentActions(appo: widget.appo, tabController: _tabController, enableFooterButton: enableFooterButton),
AppointmentActions(appo: widget.appo, tabController: _tabController, enableFooterButton: enableFooterButton, projectViewModel: projectViewModel),
DocAvailableAppointments(doctor: getDoctorObject(), doctorSchedule: widget.doctorSchedule, isLiveCareAppointment: widget.appo.isLiveCareAppointment)
],
controller: _tabController,
@ -533,8 +534,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
setTab() async {
var scheduleDoctor = await sharedPref.getObject(DOCTOR_SCHEDULE_DATE_SEL);
widget.appo.appointmentDate = scheduleDoctor['Date'];
if (scheduleDoctor != null) widget.appo.appointmentDate = scheduleDoctor['Date'];
}
confirmAppointment() {

@ -64,6 +64,8 @@ class _SchedulePageState extends State<SchedulePage> {
}
return AppScaffold(
appBarTitle: TranslationBase.of(context).schedule,
showNewAppBar: true,
showNewAppBarTitle: true,
isShowAppBar: true,
baseViewModel: model2,
isShowDecPage: false,

@ -1,4 +1,3 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart';
import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
@ -7,7 +6,6 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/reminder_dialog.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ArrivedButtons.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AskDocRequestTypeModel.dart';
@ -17,23 +15,17 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButton
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/PrescriptionReport.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/laboratory_result_page.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_page.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
@ -45,8 +37,9 @@ class AppointmentActions extends StatefulWidget {
TabController tabController;
final Function enableFooterButton;
MyInAppBrowser browser;
final ProjectViewModel projectViewModel;
AppointmentActions({@required this.appo, @required this.tabController, @required this.enableFooterButton});
AppointmentActions({@required this.appo, @required this.tabController, @required this.enableFooterButton, this.projectViewModel});
@override
_AppointmentActionsState createState() => _AppointmentActionsState();
@ -74,86 +67,25 @@ class _AppointmentActionsState extends State<AppointmentActions> {
padding: EdgeInsets.all(21),
shrinkWrap: true,
itemBuilder: (context, index) {
bool shouldEnable = (widget.appo.clinicID == 17 && appoButtonsList[index].caller == "openReschedule");
return InkWell(
onTap: () {
_handleButtonClicks(appoButtonsList[index]);
},
onTap: shouldEnable
? null
: () {
_handleButtonClicks(appoButtonsList[index]);
},
child: MedicalProfileItem(
title: appoButtonsList[index].title,
imagePath: appoButtonsList[index].icon,
subTitle: appoButtonsList[index].subtitle,
hasBadge: true,
isEnable: projectViewModel.havePrivilege(5),
isEnable: !shouldEnable,
imgColor: Color(0xff28323A),
),
);
},
itemCount: appoButtonsList.length,
);
return Container(
margin: EdgeInsets.all(5.0),
child: CustomScrollView(
primary: false,
physics: NeverScrollableScrollPhysics(),
slivers: <Widget>[
SliverPadding(
padding: const EdgeInsets.fromLTRB(15, 0, 15, 0),
sliver: SliverGrid.count(
crossAxisCount: 2,
childAspectRatio: (itemWidth / itemHeight),
children: appoButtonsList
.map((e) => GestureDetector(
onTap: () {
_handleButtonClicks(e);
},
child: Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.only(bottom: 4.0),
decoration: BoxDecoration(boxShadow: [BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)], borderRadius: BorderRadius.circular(10), color: Colors.white),
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Container(
margin: EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 5.0),
child: Texts(
e.title,
color: Color(0xffB8382C),
variant: "overline",
fontSize: SizeConfig.textMultiplier * 1.8,
),
),
Container(
margin: EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
child: Texts(
e.subtitle,
color: Colors.black,
variant: "overline",
fontSize: SizeConfig.textMultiplier * 1.6,
),
),
],
),
),
Container(
alignment: projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
margin: projectViewModel.isArabic ? EdgeInsets.fromLTRB(10.0, 7.0, 0.0, 8.0) : EdgeInsets.fromLTRB(0.0, 7.0, 10.0, 8.0),
child: Image.asset(e.icon, width: 40.0, height: 40.0),
),
],
),
),
))
.toList(),
),
),
],
),
);
}
_handleButtonClicks(AppoDetailsButton) {
@ -164,65 +96,40 @@ class _AppointmentActionsState extends State<AppointmentActions> {
widget.enableFooterButton();
});
break;
// case "onCancelAppointment":
// ConfirmDialog dialog = new ConfirmDialog(
// context: context,
// confirmMessage: TranslationBase.of(context).cancelAppoMsg,
// okText: TranslationBase.of(context).confirm,
// cancelText: TranslationBase.of(context).cancel_nocaps,
// okFunction: () => {cancelAppointment()},
// cancelFunction: () => {});
// dialog.showAlertDialog(context);
// break;
// case "confirmAppointment":
// confirmAppointment();
// break;
case "navigateToProject":
openMap(double.parse(widget.appo.latitude), double.parse(widget.appo.longitude));
break;
case "addReminder":
// showReminderDialog(widget.appo);
showReminderDialog(
context,
DateUtil.convertStringToDate(widget.appo.appointmentDate),
widget.appo.doctorNameObj,
"",
DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.appo.appointmentDate)),
DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.appo.appointmentDate), widget.projectViewModel.isArabic),
DateUtil.formatDateToTime(DateUtil.convertStringToDate(widget.appo.appointmentDate)),
onSuccess: () {
AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess);
},
);
break;
case "goToTodoList":
Navigator.of(context).pop();
break;
case "askDoc":
askYourDoc();
break;
case "radiology":
openAppointmentRadiology();
break;
case "labResult":
openAppointmentLabResults();
break;
case "prescriptions":
openPrescriptionReport();
break;
case "Survey":
rateAppointment();
break;
case "Insurance":
navigateToInsuranceApprovals(widget.appo.appointmentNo);
break;
@ -438,7 +345,17 @@ class _AppointmentActionsState extends State<AppointmentActions> {
patientLabOrders.orderNo = res['ListLabResultsByAppNo'][0]['OrderNo'].toString();
patientLabOrders.invoiceNo = res['ListLabResultsByAppNo'][0]['InvoiceNo'].toString();
patientLabOrders.clinicID = widget.appo.clinicID;
patientLabOrders.clinicDescription = widget.appo.clinicName;
patientLabOrders.projectID = widget.appo.projectID.toString();
patientLabOrders.doctorName = widget.appo.doctorNameObj;
patientLabOrders.doctorImageURL = widget.appo.doctorImageURL;
patientLabOrders.speciality = widget.appo.doctorSpeciality;
patientLabOrders.projectName = widget.appo.projectName;
patientLabOrders.orderDate = DateUtil.convertStringToDate(widget.appo.appointmentDate);
patientLabOrders.doctorRate = widget.appo.doctorRate;
patientLabOrders.actualDoctorRate = widget.appo.actualDoctorRate;
patientLabOrders.noOfPatientsRate = widget.appo.noOfPatientsRate;
print(patientLabOrders.invoiceNo);
print(patientLabOrders.orderNo);
navigateToLabResults(patientLabOrders);
@ -516,36 +433,6 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}
}
// showReminderDialog(AppoitmentAllHistoryResultList appo) {
//
//
// //old reminder dialog having location
// showGeneralDialog(
// barrierColor: Colors.black.withOpacity(0.5),
// transitionBuilder: (context, a1, a2, widget) {
// final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
// return Transform(
// transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
// child: Opacity(
// opacity: a1.value,
// child: ReminderDialog(
// eventId: appo.appointmentNo.toString(),
// title: "Doctor Appointment",
// description: "You have an appointment with " + appo.doctorTitle + " " + appo.doctorNameObj,
// startDate: appo.appointmentDate,
// endDate: appo.appointmentDate,
// location: appo.projectName,
// ),
// ),
// );
// },
// transitionDuration: Duration(milliseconds: 500),
// barrierDismissible: true,
// barrierLabel: '',
// context: context,
// pageBuilder: (context, animation1, animation2) {});
// }
askYourDoc() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();

@ -612,6 +612,8 @@ class _ToDoState extends State<ToDo> {
authenticatedUser,
widget.browser,
appo.isLiveCareAppointment,
null,
null,
appo.appointmentDate,
appo.appointmentNo,
appo.clinicID,

@ -3,6 +3,7 @@ import 'dart:ui';
import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/feedback/send_feedback_page.dart';
import 'package:diplomaticquarterapp/theme/colors.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';
@ -14,14 +15,13 @@ import 'status_feedback_page.dart';
class FeedbackHomePage extends StatefulWidget {
final AppoitmentAllHistoryResultList appointment;
final MessageType messageType;
const FeedbackHomePage({Key key, this.appointment, this.messageType= MessageType.NON}) : super(key: key);
const FeedbackHomePage({Key key, this.appointment, this.messageType = MessageType.NON}) : super(key: key);
@override
_FeedbackHomePageState createState() => _FeedbackHomePageState();
}
class _FeedbackHomePageState extends State<FeedbackHomePage>
with SingleTickerProviderStateMixin {
class _FeedbackHomePageState extends State<FeedbackHomePage> with SingleTickerProviderStateMixin {
TabController _tabController;
@override
@ -43,79 +43,44 @@ class _FeedbackHomePageState extends State<FeedbackHomePage>
isBottomBar: false,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).feedbackTitle,
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(
preferredSize: Size.fromHeight(65.0),
child: Stack(
children: <Widget>[
Positioned(
bottom: 1,
left: 0,
right: 0,
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
child: Container(
color: Theme.of(context)
.scaffoldBackgroundColor
.withOpacity(0.8),
height: 70.0,
),
),
),
Center(
child: Container(
height: 60.0,
margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 0.9,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Theme.of(context).dividerColor, width: 0.7),
),
color: Colors.white),
child: Center(
child: TabBar(
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: Texts(TranslationBase.of(context).send),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: Texts(TranslationBase.of(context).status),
),
),
],
),
),
),
),
],
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGrey2Color,
body: Column(
children: <Widget>[
TabBar(
controller: _tabController,
indicatorWeight: 3.0,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Color(0xff2B353E),
unselectedLabelColor: Color(0xff575757),
labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
labelStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
unselectedLabelStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
tabs: [Text(TranslationBase.of(context).send), Text(TranslationBase.of(context).status)],
),
),
body: Column(
children: <Widget>[
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[SendFeedbackPage(appointment: widget.appointment,messageType: widget.messageType,), StatusFeedbackPage()],
),
)
],
),
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
SendFeedbackPage(
appointment: widget.appointment,
messageType: widget.messageType,
),
StatusFeedbackPage()
],
),
)
],
),
);
}

@ -12,6 +12,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
@ -102,447 +103,447 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
builder: (_, model, widget) => AppScaffold(
baseViewModel: model,
isShowDecPage: false,
body: Container(
height: MediaQuery.of(context).size.height * 0.8,
child: SingleChildScrollView(
child: Form(
key: formKey,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 65,
),
Container(
margin: EdgeInsets.only(left: 20, right: 20, top: 8),
child: Texts(
TranslationBase.of(context).likeToHear,
textAlign: TextAlign.center,
),
),
InkWell(
onTap: () {
confirmBox(model);
},
child: Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
height: 50,
decoration: BoxDecoration(
border: Border.all(color: Colors.grey),
borderRadius: BorderRadius.circular(7),
color: Colors.white,
shape: BoxShape.rectangle,
body: Column(
children: [
Expanded(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: Form(
key: formKey,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
TranslationBase.of(context).likeToHear,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
child: Texts(
getSelected(context),
variant: 'bodyText',
SizedBox(height: 21),
InkWell(
onTap: () {
confirmBox(model);
},
child: Container(
padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,
border: Border.all(
color: Color(0xffefefef),
width: 1,
),
margin: EdgeInsets.only(left: 10, right: 10),
),
Icon(
Icons.arrow_drop_down,
size: 22,
color: Colors.grey,
)
],
),
),
),
if (appointHistory != null &&
messageType == MessageType.ComplaintOnAnAppointment)
InkWell(
onTap: () {
setState(() {
isShowListAppointHistory = true;
});
},
child: Container(
margin: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8)
),
child: Row(
children: <Widget>[
Container(
width: projectViewModel.isArabic ? 27 : 20,
height: projectViewModel.isArabic ? 105 : 90,
decoration: BoxDecoration(
//Colors.red[900] Color(0xff404545)
color: appointHistory.isLiveCareAppointment
? Color(0xff404545)
: !appointHistory.isInOutPatient
? Colors.red[900]
: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic
? Radius.circular(0)
: Radius.circular(8),
bottomLeft: projectViewModel.isArabic
? Radius.circular(0)
: Radius.circular(8),
topRight: projectViewModel.isArabic
? Radius.circular(8)
: Radius.circular(0),
bottomRight: projectViewModel.isArabic
? Radius.circular(8)
: Radius.circular(0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
getSelected(context),
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
color: Color(0xff2B353E),
),
),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
appointHistory.isLiveCareAppointment
? TranslationBase.of(context).liveCare.toUpperCase()
: !appointHistory.isInOutPatient
? TranslationBase.of(context)
.inPatient
.toUpperCase()
: TranslationBase.of(context)
.outpatient
.toUpperCase(),
style: TextStyle(color: Colors.white,fontSize: 12),
Icon(
Icons.keyboard_arrow_down,
size: 22,
color: Colors.grey,
)
],
),
),
),
SizedBox(height: 12),
if (appointHistory != null && messageType == MessageType.ComplaintOnAnAppointment)
InkWell(
onTap: () {
setState(() {
isShowListAppointHistory = true;
});
},
child: Container(
// margin: EdgeInsets.all(8.0),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)),
child: Row(
children: <Widget>[
Container(
width: projectViewModel.isArabic ? 27 : 20,
height: projectViewModel.isArabic ? 105 : 90,
decoration: BoxDecoration(
//Colors.red[900] Color(0xff404545)
color: appointHistory.isLiveCareAppointment
? Color(0xff404545)
: !appointHistory.isInOutPatient
? Colors.red[900]
: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
topRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0),
bottomRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0),
),
)),
),
Expanded(
flex: 4,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(10.0),
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: LargeAvatar(
name: appointHistory.doctorNameObj,
url: appointHistory.doctorImageURL,
),
),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
appointHistory.isLiveCareAppointment
? TranslationBase.of(context).liveCare.toUpperCase()
: !appointHistory.isInOutPatient
? TranslationBase.of(context).inPatient.toUpperCase()
: TranslationBase.of(context).outpatient.toUpperCase(),
style: TextStyle(color: Colors.white, fontSize: 12),
),
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Texts(
appointHistory.doctorNameObj,
bold: true,
),
Texts(
DateUtil
.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appointHistory.appointmentDate)),
variant: 'caption3',
)),
),
Expanded(
flex: 4,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(10.0),
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: LargeAvatar(
name: appointHistory.doctorNameObj,
url: appointHistory.doctorImageURL,
),
),
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
appointHistory.doctorNameObj,
bold: true,
),
Texts(
DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appointHistory.appointmentDate)),
variant: 'caption3',
),
StarRating(totalAverage: appointHistory.doctorRate.toDouble(), forceStars: true),
],
),
StarRating(
totalAverage: appointHistory
.doctorRate
.toDouble(),
forceStars: true),
],
),
),
),
],
),
],
),
],
),
),
Expanded(
flex: 1,
child: Center(
child: Icon(
Icons.arrow_forward_ios,
size: 15,
),
),
],
),
)
],
),
Expanded(
flex: 1,
child: Center(
child: Icon(
Icons.arrow_forward_ios,
size: 15,
),
),
)
],
),
),
),
),
if (messageType == MessageType.ComplaintOnAnAppointment &&
model.appointHistoryList.length != 0 &&
isShowListAppointHistory)
Container(
height: model.appointHistoryList.length > 2
? MediaQuery.of(context).size.height * 0.25
: MediaQuery.of(context).size.height * 0.15,
child: ListView.builder(
itemCount: model.appointHistoryList.length,
itemBuilder: (context, index) => InkWell(
onTap: () {
setState(() {
appointHistory = model.appointHistoryList[index];
isShowListAppointHistory = false;
});
},
child: Container(
margin: EdgeInsets.only(left: 8, right: 8),
color: Colors.white,
child: Column(
children: <Widget>[
Row(
if (messageType == MessageType.ComplaintOnAnAppointment && model.appointHistoryList.length != 0 && isShowListAppointHistory)
Container(
height: model.appointHistoryList.length > 2 ? MediaQuery.of(context).size.height * 0.25 : MediaQuery.of(context).size.height * 0.15,
child: ListView.builder(
itemCount: model.appointHistoryList.length,
itemBuilder: (context, index) => InkWell(
onTap: () {
setState(() {
appointHistory = model.appointHistoryList[index];
isShowListAppointHistory = false;
});
},
child: Container(
margin: EdgeInsets.only(left: 8, right: 8),
color: Colors.white,
child: Column(
children: <Widget>[
Expanded(
flex: 4,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(10.0),
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: LargeAvatar(
name: model
.appointHistoryList[
index]
.doctorNameObj,
url: model
.appointHistoryList[
index]
.doctorImageURL,
),
),
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <Widget>[
Texts(
model
.appointHistoryList[
index]
.doctorNameObj,
bold: true,
),
Texts(
DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(model.appointHistoryList[index].appointmentDate)),
variant: 'caption3',
Row(
children: <Widget>[
Expanded(
flex: 4,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(10.0),
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: LargeAvatar(
name: model.appointHistoryList[index].doctorNameObj,
url: model.appointHistoryList[index].doctorImageURL,
),
),
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
model.appointHistoryList[index].doctorNameObj,
bold: true,
),
Texts(
DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(model.appointHistoryList[index].appointmentDate)),
variant: 'caption3',
),
StarRating(totalAverage: model.appointHistoryList[index].doctorRate.toDouble(), forceStars: true),
],
),
StarRating(
totalAverage: model
.appointHistoryList[
index]
.doctorRate
.toDouble(),
forceStars: true),
],
),
),
),
],
),
],
),
],
),
),
Expanded(
flex: 1,
child: Center(
child: Icon(
Icons.arrow_forward_ios,
size: 15,
),
),
],
),
)
],
),
Expanded(
flex: 1,
child: Center(
child: Icon(
Icons.arrow_forward_ios,
size: 15,
),
),
SizedBox(
height: 5,
),
Divider(
height: 0.5,
color: Colors.grey[400],
)
],
),
SizedBox(
height: 5,
),
Divider(
height: 0.5,
color: Colors.grey[400],
)
],
),
),
),
),
),
),
Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hintText: TranslationBase.of(context).subject,
controller: titleController,
fontSize: 13.5,
hintColor: Colors.black,
fontWeight: FontWeight.w600,
onChanged: (v) {
setState(() {});
},
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context).emptySubject;
else
return null;
},
),
),
Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hintText: TranslationBase.of(context).message,
fontSize: 13.5,
hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 25,
minLines: 13,
controller: messageController,
suffixIcon: Icons.mic,
onSuffixTap: () {
openSpeechReco();
},
onChanged: (v) {
setState(() {});
inputWidget(TranslationBase.of(context).subject, "xxxxxxxx", titleController),
SizedBox(height: 12),
inputWidget(TranslationBase.of(context).message, "xxxxxxxx", messageController, lines: 11, suffixTap: () {
openSpeechReco();
}),
SizedBox(height: 12),
InkWell(
onTap: () {
ImageOptions.showImageOptions(context, (String image, File file) {
setState(() {
images.add(image);
});
});
},
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context).emptyMessage;
else
return null;
}),
),
InkWell(
onTap: () {
ImageOptions.showImageOptions(context,
(String image, File file) {
setState(() {
images.add(image);
});
});
},
child: Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
height: 50,
decoration: BoxDecoration(
border: Border.all(color: Colors.grey),
borderRadius: BorderRadius.circular(7),
color: Colors.white,
shape: BoxShape.rectangle,
),
child: Center(
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Icon(Icons.attach_file),
Texts(
TranslationBase.of(context).selectAttachment,
variant: 'bodyText',
textAlign: TextAlign.center,
child: Container(
padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,
border: Border.all(
color: Color(0xffefefef),
width: 1,
),
],
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Icon(
Icons.attach_file,
color: Color(0xff2B353E),
),
Text(
TranslationBase.of(context).selectAttachment,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
),
],
),
),
),
),
),
...List.generate(
images.length,
(index) => Container(
margin: EdgeInsets.all(10),
padding: EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Row(
crossAxisAlignment: CrossAxisAlignment.start,
...List.generate(
images.length,
(index) => Container(
margin: EdgeInsets.all(10),
padding: EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Icon(FontAwesomeIcons.paperclip),
SizedBox(
width: 8,
),
Texts(
'image ${index + 1}.png',
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Icon(FontAwesomeIcons.paperclip),
SizedBox(
width: 8,
),
Texts(
'image ${index + 1}.png',
),
],
),
InkWell(
onTap: () {
setState(() {
images.remove(images[index]);
});
},
child: Icon(
FontAwesomeIcons.trashAlt,
color: Colors.red[300],
))
],
),
InkWell(
onTap: () {
setState(() {
images.remove(images[index]);
});
},
child: Icon(
FontAwesomeIcons.trashAlt,
color: Colors.red[300],
))
],
),
)),
SizedBox(
height: 100,
)),
],
),
],
),
),
),
),
Container(
color: Colors.white,
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton(
TranslationBase.of(context).send,
(titleController.text.toString().isEmpty || messageController.text.toString().isEmpty)
? null
: () {
final form = formKey.currentState;
if (form.validate()) {
GifLoaderDialogUtils.showMyDialog(context);
model
.sendCOCItem(
title: titleController.text,
attachment: images.length > 0 ? images[0] : "",
details: messageController.text,
cOCTypeName: getCOCName(),
appointHistory: messageType == MessageType.ComplaintOnAnAppointment ? appointHistory : null)
.then((value) {
if (value) {
setState(() {
titleController.text = "";
messageController.text = "";
images = [];
});
setMessageType(MessageType.NON);
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(message: TranslationBase.of(context).yourFeedback);
} else {
AppToast.showErrorToast(message: model.error);
GifLoaderDialogUtils.hideDialog(context);
}
});
}
},
color: Color(0xffD02127),
textColor: (titleController.text.toString().isEmpty || messageController.text.toString().isEmpty) ? Color(0xff000000) : Colors.white,
disabledColor: Color(0xffEAEAEA),
),
),
],
),
bottomSheet: Container(
height: 80,
width: double.infinity,
padding: EdgeInsets.all(15.0),
child: Center(
child: Container(
height: MediaQuery.of(context).size.height * 0.1,
child: SecondaryButton(
label: TranslationBase.of(context).send,
textColor: Colors.white,
disabled: (titleController.text.toString().isEmpty ||
messageController.text.toString().isEmpty),
onTap: () {
final form = formKey.currentState;
if (form.validate()) {
GifLoaderDialogUtils.showMyDialog(context);
model
.sendCOCItem(
title: titleController.text,
attachment: images.length > 0 ? images[0] : "",
details: messageController.text,
cOCTypeName: getCOCName(),
appointHistory: messageType ==
MessageType.ComplaintOnAnAppointment
? appointHistory
: null)
.then((value) {
if (value) {
setState(() {
titleController.text = "";
messageController.text = "";
images = [];
});
setMessageType(MessageType.NON);
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(
message: TranslationBase.of(context).yourFeedback);
} else {
AppToast.showErrorToast(message: model.error);
GifLoaderDialogUtils.hideDialog(context);
}
});
}
},
),
);
}
Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {VoidCallback suffixTap, bool isEnable = true, bool hasSelection = false, int lines}) {
return Container(
padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,
border: Border.all(
color: Color(0xffefefef),
width: 1,
),
),
child: InkWell(
onTap: hasSelection ? () {} : null,
child: Row(
children: [
Expanded(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
_labelText,
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.44,
),
),
TextField(
enabled: isEnable,
scrollPadding: EdgeInsets.zero,
keyboardType: TextInputType.number,
controller: _controller,
maxLines: lines,
onChanged: (value) => {setState(() {})},
style: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff2B353E),
letterSpacing: -0.44,
),
decoration: InputDecoration(
isDense: true,
hintText: _hintText,
hintStyle: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff575757),
letterSpacing: -0.56,
),
suffixIconConstraints: BoxConstraints(minWidth: 50),
suffixIcon: suffixTap == null ? null : IconButton(icon: Icon(Icons.mic, color: Color(0xff2E303A)), onPressed: suffixTap),
// prefixIconConstraints: BoxConstraints(minWidth: 50),
// prefixIcon: suffix == null
// ? null
// : Text(
// "+" + suffix,
// style: TextStyle(
// fontSize: 14,
// height: 21 / 14,
// fontWeight: FontWeight.w500,
// color: Color(0xff2E303A),
// letterSpacing: -0.56,
// ),
// ),
contentPadding: EdgeInsets.zero,
border: InputBorder.none,
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
),
),
],
),
),
),
if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined),
],
),
),
);
@ -595,10 +596,8 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
openSpeechReco() async {
new RoboSearch(context: context).showAlertDialog(context);
_currentLocaleId =
TranslationBase.of(AppGlobal.context).locale.languageCode;
bool available = await speech.initialize(
onStatus: statusListener, onError: errorListener);
_currentLocaleId = TranslationBase.of(AppGlobal.context).locale.languageCode;
bool available = await speech.initialize(onStatus: statusListener, onError: errorListener);
if (available) {
speech.listen(
onResult: resultListener,
@ -641,8 +640,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
}
Future<void> initSpeechState() async {
bool hasSpeech = await speech.initialize(
onError: errorListener, onStatus: statusListener);
bool hasSpeech = await speech.initialize(onError: errorListener, onStatus: statusListener);
print(hasSpeech);
if (!mounted) return;
}
@ -652,9 +650,7 @@ class FeedbackTypeDialog extends StatefulWidget {
final Function(MessageType) onValueSelected;
final MessageType messageTypeDialog;
const FeedbackTypeDialog(
{Key key, this.onValueSelected, this.messageTypeDialog = MessageType.NON})
: super(key: key);
const FeedbackTypeDialog({Key key, this.onValueSelected, this.messageTypeDialog = MessageType.NON}) : super(key: key);
@override
State createState() => new FeedbackTypeDialogState();
@ -699,14 +695,12 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
child: InkWell(
onTap: () => setMessageDialogType(MessageType.NON),
child: ListTile(
title:
Texts(TranslationBase.of(context).notClassified),
title: Texts(TranslationBase.of(context).notClassified),
leading: Radio(
value: MessageType.NON,
groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) =>
setMessageDialogType(value),
onChanged: (MessageType value) => setMessageDialogType(value),
),
),
),
@ -721,17 +715,14 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
Expanded(
flex: 1,
child: InkWell(
onTap: () => setMessageDialogType(
MessageType.ComplaintOnAnAppointment),
onTap: () => setMessageDialogType(MessageType.ComplaintOnAnAppointment),
child: ListTile(
title:
Texts(TranslationBase.of(context).complainAppo),
title: Texts(TranslationBase.of(context).complainAppo),
leading: Radio(
value: MessageType.ComplaintOnAnAppointment,
groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) =>
setMessageDialogType(value),
onChanged: (MessageType value) => setMessageDialogType(value),
),
),
),
@ -746,17 +737,14 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
Expanded(
flex: 1,
child: InkWell(
onTap: () => setMessageDialogType(
MessageType.ComplaintWithoutAppointment),
onTap: () => setMessageDialogType(MessageType.ComplaintWithoutAppointment),
child: ListTile(
title: Texts(
TranslationBase.of(context).complainWithoutAppo),
title: Texts(TranslationBase.of(context).complainWithoutAppo),
leading: Radio(
value: MessageType.ComplaintWithoutAppointment,
groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) =>
setMessageDialogType(value),
onChanged: (MessageType value) => setMessageDialogType(value),
),
),
),
@ -778,8 +766,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
value: MessageType.Question,
groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) =>
setMessageDialogType(value),
onChanged: (MessageType value) => setMessageDialogType(value),
),
),
),
@ -794,16 +781,14 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
Expanded(
flex: 1,
child: InkWell(
onTap: () =>
setMessageDialogType(MessageType.Compliment),
onTap: () => setMessageDialogType(MessageType.Compliment),
child: ListTile(
title: Texts(TranslationBase.of(context).compliment),
leading: Radio(
value: MessageType.Compliment,
groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) =>
setMessageDialogType(value),
onChanged: (MessageType value) => setMessageDialogType(value),
),
),
),
@ -818,16 +803,14 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
Expanded(
flex: 1,
child: InkWell(
onTap: () =>
setMessageDialogType(MessageType.Suggestion),
onTap: () => setMessageDialogType(MessageType.Suggestion),
child: ListTile(
title: Texts(TranslationBase.of(context).suggestion),
leading: Radio(
value: MessageType.Suggestion,
groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) =>
setMessageDialogType(value),
onChanged: (MessageType value) => setMessageDialogType(value),
),
),
),

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback-detail.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -24,120 +25,116 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
builder: (_, model, widget) => AppScaffold(
baseViewModel: model,
isShowDecPage: false,
body: model.cOCItemList.isNotEmpty
? Container(
margin: EdgeInsets.only(
top: 8.0, left: 8.0, right: 8.0, bottom: 80),
padding: EdgeInsets.all(15.0),
child: ListView.builder(
itemCount: model.cOCItemList.length,
itemBuilder: (context, index) => InkWell(
onTap: () {
gotodetails(model.cOCItemList[index]);
},
child: Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
border: Border.all(color: Colors.white, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(5)),
color: Colors.white,
),
margin: EdgeInsets.all(4),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 8,
body: Column(
children: [
Expanded(
child: model.cOCItemList.isNotEmpty
? Container(
margin: EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0, bottom: 80),
padding: EdgeInsets.all(15.0),
child: ListView.builder(
itemCount: model.cOCItemList.length,
itemBuilder: (context, index) => InkWell(
onTap: () {
gotodetails(model.cOCItemList[index]);
},
child: Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
border: Border.all(color: Colors.white, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(5)),
color: Colors.white,
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Texts(
'${model.cOCItemList[index].cOCTitle}'),
Texts(
TranslationBase.of(context).number +
' : ${model.cOCItemList[index].itemID}',
variant: 'overline',
),
],
margin: EdgeInsets.all(4),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 8,
),
),
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Texts(
'${model.cOCItemList[index].status}'),
Texts(
'${model.cOCItemList[index].date}',
variant: 'overline',
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts('${model.cOCItemList[index].cOCTitle}'),
Texts(
TranslationBase.of(context).number + ' : ${model.cOCItemList[index].itemID}',
variant: 'overline',
),
],
),
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts('${model.cOCItemList[index].status}'),
Texts(
'${model.cOCItemList[index].date}',
variant: 'overline',
),
],
),
),
],
),
),
],
Texts('${model.cOCItemList[index].formType}'),
Divider(
height: 4.5,
color: Colors.grey[500],
)
],
),
),
Texts('${model.cOCItemList[index].formType}'),
Divider(
height: 4.5,
color: Colors.grey[500],
)
],
))),
)
: Center(
child: Column(
children: [
SizedBox(
height: MediaQuery.of(context).size.height * 0.4,
),
Image.asset(
'assets/images/comments.png',
width: 80,
height: 80,
),
SizedBox(
height: 15,
),
Text(
TranslationBase.of(context).noSearchResult,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
color: Color(0xff2B353E),
),
),
))),
)
: Container(
child: Center(
child: Column(
children: [
SizedBox(
height: MediaQuery.of(context).size.height * 0.4,
),
Image.asset(
'assets/images/comments.png',
width: 80,
height: 80,
],
),
SizedBox(
height: 15,
),
Texts(TranslationBase.of(context).noSearchResult),
],
),
),
),
bottomSheet: Container(
height: 80,
width: double.infinity,
padding: EdgeInsets.all(15.0),
child: Center(
child: Container(
height: MediaQuery.of(context).size.height * 0.1,
child: SecondaryButton(
label: TranslationBase.of(context).search,
textColor: Colors.white,
disabled: true,
onTap: () {},
),
),
Container(
color: Colors.white,
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton(
TranslationBase.of(context).search,
() => {},
),
),
),
],
),
),
);
}
gotodetails(item) {
Navigator.pushReplacement(
context, FadePage(page: FeedbackDetails(items: item)));
Navigator.pushReplacement(context, FadePage(page: FeedbackDetails(items: item)));
}
}

@ -36,7 +36,7 @@ class _HomePageFragmentState extends State<HomePageFragment> {
hmgServices.add(new HmgServices(2, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(new HmgServices(4, TranslationBase.of(context).refferal, TranslationBase.of(context).services2, "assets/images/new/E_Refferal.svg", isLogin));
hmgServices.add(new HmgServices(5, "RRT", TranslationBase.of(context).emergency, "assets/images/new/RRT.svg", isLogin));
hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergency, TranslationBase.of(context).services, "assets/images/new/RRT.svg", isLogin));
}
@override

@ -26,9 +26,9 @@ import 'dart:math' as math;
class HomePageFragment2 extends StatefulWidget {
DashboardViewModel model;
Function onPharmacyClick, onLoginClick,onMedicalFileClick;
Function onPharmacyClick, onLoginClick, onMedicalFileClick;
HomePageFragment2(this.model, {this.onLoginClick, this.onPharmacyClick,this.onMedicalFileClick});
HomePageFragment2(this.model, {this.onLoginClick, this.onPharmacyClick, this.onMedicalFileClick});
@override
_HomePageFragment2State createState() => _HomePageFragment2State();
@ -55,7 +55,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/visa.png", isLogin));
hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(new HmgServices(5, "RRT", TranslationBase.of(context).emergency, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergency, TranslationBase.of(context).services2, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(new HmgServices(6, TranslationBase.of(context).refferal, TranslationBase.of(context).services2, "assets/images/new/E_Referral.svg", isLogin));
hmgServices.add(new HmgServices(7, "H\u2082O", TranslationBase.of(context).dailyWater, "assets/images/new/h2o.svg", isLogin));
hmgServices.add(new HmgServices(8, TranslationBase.of(context).reachUs, TranslationBase.of(context).findUs, "assets/images/new/reach_us.svg", isLogin));
@ -130,7 +130,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
FlatButton(
onPressed: () {
widget.onMedicalFileClick();
// navigateTo(context, MedicalProfilePageNew());
// navigateTo(context, MedicalProfilePageNew());
},
child: Text(
TranslationBase.of(context).viewMedicalFile,

@ -61,7 +61,7 @@ class _HomePageFragmentState extends State<LoggedHomePageFragment> {
hmgServices.add(new HmgServices(2, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(new HmgServices(4, TranslationBase.of(context).refferal, TranslationBase.of(context).services2, "assets/images/new/E_Refferal.svg", isLogin));
hmgServices.add(new HmgServices(5, "RRT", TranslationBase.of(context).emergency, "assets/images/new/RRT.svg", isLogin));
hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergency, TranslationBase.of(context).services, "assets/images/new/RRT.svg", isLogin));
}
Future<GetAllSharedRecordsByStatusResponse> getFamilyFiles() async {
@ -93,7 +93,8 @@ class _HomePageFragmentState extends State<LoggedHomePageFragment> {
child: LoggedSliderView(
widget.projectViewModel,
new SliderData(TranslationBase.of(context).fileno + ": " + widget.projectViewModel.user.patientID.toString(),
widget.projectViewModel.user.firstName + ' ' + widget.projectViewModel.user.lastName, "", bannerColor[0].darkColor, bannerColor[0].lightColor),null),
widget.projectViewModel.user.firstName + ' ' + widget.projectViewModel.user.lastName, "", bannerColor[0].darkColor, bannerColor[0].lightColor),
null),
),
),
appoCountProvider.count == 0

@ -1,11 +1,10 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart';
@ -21,7 +20,6 @@ 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';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:feather_icons_flutter/feather_icons_flutter.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
@ -42,6 +40,12 @@ class HomePage extends StatefulWidget {
class _HomePageState extends State<HomePage> {
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
@override
void initState() {
// TODO: implement initState
super.initState();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
@ -603,14 +607,14 @@ class _HomePageState extends State<HomePage> {
SizedBox(
height: 8,
),
InkWell(
onTap: () => Navigator.push(context, FadePage(page: PaymentService())),
child: Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
InkWell(
onTap: () => Navigator.push(context, FadePage(page: PaymentService())),
child: Container(
width: MediaQuery.of(context).size.width * 0.29,
child: Center(
child: Padding(
@ -641,7 +645,12 @@ class _HomePageState extends State<HomePage> {
color: Colors.white,
),
),
Container(
),
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: EReferralPage()));
},
child: Container(
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
@ -656,7 +665,7 @@ class _HomePageState extends State<HomePage> {
height: 10,
),
Texts(
TranslationBase.of(context).offersAndPackages,
TranslationBase.of(context).ereferral,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
@ -672,51 +681,52 @@ class _HomePageState extends State<HomePage> {
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
)),
if (projectViewModel.havePrivilege(60))
Container(
width: MediaQuery.of(context).size.width * 0.29,
child: InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: ErOptions(
isAppbar: true,
))),
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
),
SizedBox(
height: 10,
),
Texts(
TranslationBase.of(context).emergencyServices,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 1.7,
)
],
),
),
if (projectViewModel.havePrivilege(60))
Container(
width: MediaQuery.of(context).size.width * 0.29,
child: InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: ErOptions(
isAppbar: true,
))),
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
),
SizedBox(
height: 10,
),
Texts(
TranslationBase.of(context).emergencyServices,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 1.7,
)
],
),
),
),
height: MediaQuery.of(context).size.width * 0.4,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
),
],
),
height: MediaQuery.of(context).size.width * 0.4,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
),
],
),
),
// ),
SizedBox(
height: 5,
),

@ -157,21 +157,28 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
return;
}
}
setState(() {
if (currentTab > 0 && tab == 2)
pageController.jumpToPage(0);
else if (tab != 0) {
if (tab == 4 && model.count == 0) {
AppToast.showErrorToast(message: TranslationBase.of(context).noBookedAppo);
if (tab == 5) {
IS_VOICE_COMMAND_CLOSED = false;
triggerRobot();
// pageController.jumpToPage(tab);
} else {
if (currentTab > 0 && tab == 2)
pageController.jumpToPage(0);
else if (tab != 0) {
if (tab == 4 && projectViewModel.isLogin && model.count == 0) {
AppToast.showErrorToast(message: TranslationBase.of(context).noBookedAppo);
} else {
pageController.jumpToPage(tab);
}
} else {
pageController.jumpToPage(tab);
}
} else {
IS_VOICE_COMMAND_CLOSED = false;
pageController.jumpToPage(tab);
currentTab = tab;
}
currentTab = tab;
});
}
@ -225,7 +232,6 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
locationUtils = new LocationUtils(isShowConfirmDialog: false, context: context);
WidgetsBinding.instance.addPostFrameCallback((_) {
// locationUtils.getCurrentLocation();
if (projectViewModel.isLogin) {
familyFileProvider.getSharedRecordByStatus();
}
@ -242,6 +248,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
}
requestPermissions().then((results) {
locationUtils.getCurrentLocation();
_firebaseMessaging.getToken().then((String token) {
print("Firebase Token: " + token);
sharedPref.setString(PUSH_TOKEN, token);
@ -259,7 +266,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
// if (results[Permission.calendar].isGranted) ;
});
requestPermissions();
// requestPermissions();
// });
//
@ -608,7 +615,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
onLoginClick: () {
login();
},
onMedicalFileClick: (){
onMedicalFileClick: () {
changeCurrentTab(1);
},
),
@ -634,7 +641,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
}
triggerRobot() {
event.setValue({"isRobot": 'true'});
event.setValue({"isRobotVisible": 'true'});
}
getText(currentTab) {

@ -148,7 +148,7 @@ class LoggedSliderView extends StatelessWidget {
),
mWidth(6),
Texts(
"Height: ${model.heightCm} ${TranslationBase.of(context).cm}",
"${TranslationBase.of(context).height}: ${model.heightCm} ${TranslationBase.of(context).cm}",
color: Colors.white,
fontSize: 10,
)
@ -167,7 +167,7 @@ class LoggedSliderView extends StatelessWidget {
height: 12,
),
mWidth(6),
Texts('Weight: ${model.weightKg} ${TranslationBase.of(context).kg}', color: Colors.white, fontSize: 10)
Texts('${TranslationBase.of(context).weight}: ${model.weightKg} ${TranslationBase.of(context).kg}', color: Colors.white, fontSize: 10)
],
),
),
@ -183,7 +183,7 @@ class LoggedSliderView extends StatelessWidget {
height: 12,
),
mWidth(6),
Texts('Blood: ${model.booldType}', color: Colors.white, fontSize: 10)
Texts('${TranslationBase.of(context).bloodD}: ${model.booldType}', color: Colors.white, fontSize: 10)
],
),
),

@ -39,7 +39,7 @@ class _State extends State<ClinicCard> {
children: <Widget>[
Card(
margin: EdgeInsets.fromLTRB(15.0, 10.0, 8.0, 8.0),
color: widget.isSelected ? Colors.blue : widget.patientERGetClinicsList.isOnline == 1 ? Colors.white : Colors.grey,
color: widget.isSelected ? Color(0xff06b806) : widget.patientERGetClinicsList.isOnline == 1 ? Colors.white : Colors.grey,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),

@ -256,7 +256,7 @@ class _clinic_listState extends State<ClinicList> {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
browser.openPaymentBrowser(amount, "LiveCare Payment", Utils.getAppointmentTransID(12, appo.clinicID, appo.appointmentNo), "12", authenticatedUser.emailAddress, paymentMethod,
authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false);
authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "4", selectedClinicID.toString());
}
onBrowserLoadStart(String url) {

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
@ -23,9 +24,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -35,7 +34,6 @@ import 'package:intl/intl.dart';
import 'package:local_auth/auth_strings.dart';
import 'package:local_auth/local_auth.dart';
import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
class ConfirmLogin extends StatefulWidget {
@override
@ -161,9 +159,9 @@ class _ConfirmLogin extends State<ConfirmLogin> {
),
Text(
user.editedOn != null
? DateUtil.formatDateToDate(DateUtil.convertStringToDate(user.editedOn))
? DateUtil.formatDateToDate(DateUtil.convertStringToDate(user.editedOn), projectViewModel.isArabic)
: user.createdOn != null
? DateUtil.formatDateToDate(DateUtil.convertStringToDate(user.createdOn))
? DateUtil.formatDateToDate(DateUtil.convertStringToDate(user.createdOn), projectViewModel.isArabic)
: '--',
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48),
),
@ -375,6 +373,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
}
var tempType;
startSMSService(type) {
tempType = type;
new SMSOTP(
@ -510,9 +509,12 @@ class _ConfirmLogin extends State<ConfirmLogin> {
GifLoaderDialogUtils.showMyDialog(context);
var request = this.getCommonRequest().toJson();
dynamic res;
authService
.checkActivationCode(request, value)
.then((result) => {
res = result,
if (result is Map)
{
result = CheckActivationCode.fromJson(result),
@ -530,7 +532,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
// sharedPref.setString(
// BLOOD_TYPE, result['PatientBloodType']),
authenticatedUserObject.user = result.list,
projectViewModel.setPrivilege(privilegeList: res),
sharedPref.setObject(MAIN_USER, result.list),
sharedPref.setObject(USER_PROFILE, result.list),
loginTokenID = result.logInTokenID,

@ -224,7 +224,6 @@ class _Login extends State<Login> {
}
void validateForm() {
print("mobileNo:${mobileNo}");
if (util.validateIDBox(nationalIDorFile.text, loginType) == true && util.isSAUDIIDValid(nationalIDorFile.text, loginType) == true) {
setState(() {
isButtonDisabled = false;
@ -234,7 +233,6 @@ class _Login extends State<Login> {
isButtonDisabled = true;
});
}
print("isButtonDisabled:${isButtonDisabled}");
}
checkUserAuthentication() {

@ -1,5 +1,6 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/ask_doctor_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
@ -46,6 +47,12 @@ class _AskDoctorHomPageState extends State<AskDoctorHomPage> with SingleTickerPr
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: Color(0xffF8F8F8),
isShowDecPage: true,
description: TranslationBase.of(context).infoAskDoc,
imagesInfo: [
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/ar/0.png'),
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/ar/1.png')
],
body: Column(
children: [
Row(

@ -1,4 +1,4 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/service/medical/ask_doctor_services.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/ask_doctor_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
@ -6,14 +6,16 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/ask_doctor/request_type.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:rating_bar/rating_bar.dart';
class AskDoctorPage extends StatelessWidget {
AskDoctorService service = new AskDoctorService();
@override
Widget build(BuildContext context) {
return BaseView<AskDoctorViewModel>(
@ -65,9 +67,10 @@ class AskDoctorPage extends StatelessWidget {
doctor: doctorList,
isLiveCareAppointment: false,
onTap: () {
model.getCallInfoHoursResult(doctorId: _doctor.doctorID, projectId: _doctor.projectID).then((value) {
if (model.state != ViewState.ErrorLocal && model.state != ViewState.Error) {
// Navigator.pop(context);
GifLoaderDialogUtils.showMyDialog(context);
service.getCallInfoHoursResult(doctorId: _doctor.doctorID, projectId: _doctor.projectID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['ErrorEndUserMessage'] == null) {
Navigator.push(
context,
FadePage(
@ -75,8 +78,12 @@ class AskDoctorPage extends StatelessWidget {
),
);
} else {
AppToast.showErrorToast(message: model.error);
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
if (err != null) AppToast.showErrorToast(message: err);
print(err);
});
},
);

@ -3,9 +3,8 @@ import 'package:diplomaticquarterapp/core/viewModels/medical/ask_doctor_view_mod
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -32,6 +31,8 @@ class _RequestTypePageState extends State<RequestTypePage> {
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).requestType,
baseViewModel: model,
showNewAppBar: true,
showNewAppBarTitle: true,
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.all(10),
@ -99,22 +100,24 @@ class _RequestTypePageState extends State<RequestTypePage> {
),
bottomSheet: Container(
width: double.maxFinite,
// height: MediaQuery.of(context).size.height * 0.1,
height: 80.0,
child: Padding(
padding: const EdgeInsets.all(12.0),
child: SecondaryButton(
label: TranslationBase.of(context).submit,
loading: model.state == ViewState.BusyLocal,
textColor: Colors.white,
onTap: () {
model.sendRequestLOV(doctorList: widget.doctorList, requestType: parameterCode.toString(), remark: question).then((value) {
if (model.state != ViewState.ErrorLocal || model.state != ViewState.Error) {
Navigator.pop(context);
}
});
},
color: Colors.grey[800],
child: Container(
width: MediaQuery.of(context).size.width * 0.8,
child: DefaultButton(
TranslationBase.of(context).submit,
() => {
model.sendRequestLOV(doctorList: widget.doctorList, requestType: parameterCode.toString(), remark: question).then((value) {
if (model.state != ViewState.ErrorLocal || model.state != ViewState.Error) {
Navigator.pop(context);
}
})
},
color: Color(0xffD02127),
textColor: Colors.white,
disabledColor: Color(0xffEAEAEA),
),
),
),
),

@ -1,13 +1,7 @@
import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -135,7 +129,7 @@ class ClassesPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(flex: 4, child: Text(title,style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, letterSpacing: -0.4),)),
Expanded(flex: 4, child: Text(title,style: TextStyle(fontSize: 11, fontWeight: FontWeight.w600, letterSpacing: -0.4))),
Expanded(
flex: 2,
child: Row(
@ -143,11 +137,11 @@ class ClassesPage extends StatelessWidget {
children: [
Text(
val1 == 'null' ? '-' : val1,
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, letterSpacing: -0.4),
style: TextStyle(fontSize: 11, fontWeight: FontWeight.w600, letterSpacing: -0.4),
),
Text(
val2 != 'null' ? '-' : val2,
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, letterSpacing: -0.4),
style: TextStyle(fontSize: 11, fontWeight: FontWeight.w600, letterSpacing: -0.4),
),
],
),

@ -142,7 +142,7 @@ class ContactLensPage extends StatelessWidget {
flex: 4,
child: Text(
title,
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, letterSpacing: -0.4),
style: TextStyle(fontSize: 11, fontWeight: FontWeight.w600, letterSpacing: -0.4),
)),
Expanded(
flex: 2,
@ -152,7 +152,7 @@ class ContactLensPage extends StatelessWidget {
children: [
Text(
val1 == 'null' ? '-' : val1,
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, letterSpacing: -0.4),
style: TextStyle(fontSize: 11, fontWeight: FontWeight.w600, letterSpacing: -0.4),
),
],
),

@ -120,7 +120,7 @@ class _EyeHomePageState extends State<EyeHomePage> with SingleTickerProviderStat
TranslationBase.of(context).classes,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
// fontSize: 12,
letterSpacing: -0.36,
),
),
@ -133,7 +133,7 @@ class _EyeHomePageState extends State<EyeHomePage> with SingleTickerProviderStat
TranslationBase.of(context).contactLens,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
// fontSize: 12,
letterSpacing: -0.36,
),
),

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
@ -31,6 +32,12 @@ class EyeMeasurementsPage extends StatelessWidget {
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGreyColor,
description: TranslationBase.of(context).infoEye,
imagesInfo: [
ImagesInfo(
imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/eye-measurements/ar/0.png',
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/eye-measurements/en/0.png')
],
appBarTitle: TranslationBase.of(context).eyeMeasurements,
body: SingleChildScrollView(
child: Column(

@ -37,7 +37,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
builder: (_, model, widget) => AppScaffold(
isShowDecPage: false,
baseViewModel: model,
isHelp: true,
isHelp: false,
body: Container(
child: SingleChildScrollView(
child: Column(

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'
as DoctorListResponse;
@ -24,21 +25,28 @@ class _MyInvoicesState extends State<MyInvoices> {
GetDentalAppointmentsResponse getDentalAppointmentsResponse;
DentalInvoiceDetailResponse dentalInvoiceDetailResponse;
ProjectViewModel projectViewModel;
List<ImagesInfo> imagesInfo = List();
@override
void initState() {
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-invoice/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-invoice/ar/0.png'));
WidgetsBinding.instance.addPostFrameCallback((_) {
getDentalAppointments();
if(projectViewModel.isLogin)
getDentalAppointments();
});
super.initState();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
projectViewModel = Provider.of(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).myInvoice,
isShowAppBar: true,
isShowDecPage: true,
imagesInfo: imagesInfo,
body: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.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';
@ -15,7 +16,11 @@ class MyTrackers extends StatelessWidget {
return AppScaffold(
appBarTitle: TranslationBase.of(context).myTracker,
isShowAppBar: true,
isShowDecPage: false,
isShowDecPage: true,
description: TranslationBase.of(context).infoTrackers,
imagesInfo: [
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-trackers/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-trackers/ar/0.png')
],
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.all(12),
@ -33,8 +38,7 @@ class MyTrackers extends StatelessWidget {
margin: EdgeInsets.all(5),
width: MediaQuery.of(context).size.width * 0.35,
height: MediaQuery.of(context).size.width * 0.35,
decoration: BoxDecoration(
shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
decoration: BoxDecoration(shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
@ -59,8 +63,7 @@ class MyTrackers extends StatelessWidget {
margin: EdgeInsets.all(5),
width: MediaQuery.of(context).size.width * 0.35,
height: MediaQuery.of(context).size.width * 0.35,
decoration: BoxDecoration(
shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
decoration: BoxDecoration(shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
@ -90,8 +93,7 @@ class MyTrackers extends StatelessWidget {
margin: EdgeInsets.all(5),
width: MediaQuery.of(context).size.width * 0.35,
height: MediaQuery.of(context).size.width * 0.35,
decoration: BoxDecoration(
shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
decoration: BoxDecoration(shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,

@ -37,24 +37,28 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
appBarTitle: TranslationBase.of(context).sickLeaves,
description: TranslationBase.of(context).infoSickLeaves,
infoList: TranslationBase.of(context).infoSickLeavePoints,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: Color(0xffF7F7F7),
imagesInfo: imagesInfo,
baseViewModel: model,
body: Container(
margin: EdgeInsets.all(12),
child: ListView.builder(
itemCount: model.sickLeaveList.length,
itemBuilder: (context, index) => DoctorCard(
isLiveCareAppointment: model.sickLeaveList[index].isLiveCareAppointment,
name: model.sickLeaveList[index].doctorName,
date: model.sickLeaveList[index].appointmentDate,
profileUrl: model.sickLeaveList[index].doctorImageURL,
rating: model.sickLeaveList[index].actualDoctorRate.toDouble(),
subName: model.sickLeaveList[index].projectName,
isInOutPatient: model.sickLeaveList[index].isInOutPatient,
onEmailTap: () {
showConfirmMessage(model, index);
},
),
body: ListView.separated(
physics: BouncingScrollPhysics(),
itemCount: model.sickLeaveList.length,
padding: EdgeInsets.all(21),
separatorBuilder: (context, index) => SizedBox(height: 14),
itemBuilder: (context, index) => DoctorCard(
isLiveCareAppointment: model.sickLeaveList[index].isLiveCareAppointment,
name: model.sickLeaveList[index].doctorName,
date: model.sickLeaveList[index].appointmentDate,
profileUrl: model.sickLeaveList[index].doctorImageURL,
rating: model.sickLeaveList[index].actualDoctorRate.toDouble(),
subName: model.sickLeaveList[index].clinicName,
isSortByClinic: false,
isInOutPatient: model.sickLeaveList[index].isInOutPatient,
onEmailTap: () {
showConfirmMessage(model, index);
},
),
),
),

@ -86,12 +86,6 @@ class RadiologyDetailsPage extends StatelessWidget {
'${finalRadiology.reportData}',
style: TextStyle(fontSize: 12, letterSpacing: -0.48),
),
// Texts(
// '${finalRadiology.reportData}',
// textAlign: TextAlign.start,
// fontSize: 12,
//
// ),
mHeight(16),
(projectViewModel.havePrivilege(9) || projectViewModel.havePrivilege(8))
? (finalRadiology.dIAPACSURL != "" && projectViewModel.havePrivilege(9))

@ -1,16 +1,15 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/reports/user_agreement_page.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/input/custom_switch.dart';
import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
class MonthlyReportsPage extends StatefulWidget {
@ -24,6 +23,17 @@ class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
String email;
final formKey = GlobalKey<FormState>();
List<ImagesInfo> imagesInfo = List();
@override
void initState() {
imagesInfo.add(ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/ar/0.png'));
imagesInfo.add(ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/ar/1.png'));
super.initState();
}
@override
Widget build(BuildContext context) {
return BaseView<ReportsMonthlyViewModel>(builder: (_, model, w) {
@ -39,153 +49,197 @@ class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).monthlyReports,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: Color(0xffF7F7F7),
imagesInfo: imagesInfo,
description: TranslationBase.of(context).infoMonthReport,
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.all(12),
child: Form(
key: formKey,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.all(9),
height: 55,
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(8)), shape: BoxShape.rectangle, border: Border.all(color: Colors.grey)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(
TranslationBase.of(context).patientHealthSummaryReport,
bold: true,
),
CustomSwitch(
value: isSummary,
activeColor: Colors.red,
inactiveColor: Colors.grey,
onChanged: () async {
setState(() {
isSummary = !isSummary;
});
if (!isSummary) {
GifLoaderDialogUtils.showMyDialog(context);
await model.updatePatientHealthSummaryReport(message: TranslationBase.of(context).updateSuccessfully, isSummary: isSummary);
model.receiveHealthSummaryReport = isSummary;
isAgree = isSummary;
model.user.emailAddress = "";
GifLoaderDialogUtils.hideDialog(context);
}
},
)
],
),
),
SizedBox(
height: 15,
),
Container(
margin: EdgeInsets.all(8),
child: TextFields(
fillColor: Colors.red,
hintText: 'email@email.com',
fontSize: 20,
initialValue: email,
fontWeight: FontWeight.w600,
onChanged: (text) {
email = text;
},
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context).enterEmail;
else
return null;
},
),
),
Divider(
height: 10.4,
thickness: 1.0,
),
SizedBox(
height: 15,
),
Container(
margin: EdgeInsets.all(8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Texts(TranslationBase.of(context).toViewTheTermsAndConditions),
physics: BouncingScrollPhysics(),
padding: EdgeInsets.all(21),
child: Form(
key: formKey,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.only(right: 12, left: 12, top: 14, bottom: 14),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
//spreadRadius: 5,
blurRadius: 27,
offset: Offset(0, -3),
),
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: UserAgreementContent(),
),
);
},
child: Texts(
TranslationBase.of(context).clickHere,
color: Colors.blue,
),
)
],
),
),
SizedBox(
height: 5,
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
color: Colors.white),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Checkbox(
value: isAgree,
onChanged: (value) {
Expanded(
child: Text(
TranslationBase.of(context).patientHealthSummaryReport,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 25 / 16),
),
),
CustomSwitch(
value: isSummary,
activeColor: Color(0xffD02127),
inactiveColor: Color(0xff28323A).withOpacity(0.3),
onChanged: () async {
setState(() {
isAgree = !isAgree;
isSummary = !isSummary;
});
if (!isSummary) {
GifLoaderDialogUtils.showMyDialog(context);
await model.updatePatientHealthSummaryReport(message: TranslationBase.of(context).updateSuccessfully, isSummary: isSummary);
model.receiveHealthSummaryReport = isSummary;
isAgree = isSummary;
model.user.emailAddress = "";
GifLoaderDialogUtils.hideDialog(context);
}
},
activeColor: Colors.red,
)
],
),
),
SizedBox(
height: 15,
),
Container(
padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,
border: Border.all(
color: Color(0xffefefef),
width: 1,
),
),
child: Row(
children: [
Expanded(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).email,
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.44,
),
),
TextFormField(
scrollPadding: EdgeInsets.zero,
keyboardType: TextInputType.number,
// controller: _controller,
onChanged: (value) => {email = value},
initialValue: email,
style: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff2B353E),
letterSpacing: -0.44,
),
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context).enterEmail;
else
return null;
},
decoration: InputDecoration(
isDense: true,
hintText: "email@email.com",
hintStyle: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff575757),
letterSpacing: -0.56,
),
contentPadding: EdgeInsets.zero,
border: InputBorder.none,
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
),
),
],
),
),
Texts(TranslationBase.of(context).iAgreeToTheTermsAndConditions),
],
),
Container(
margin: EdgeInsets.all(8),
width: double.infinity,
child: SecondaryButton(
textColor: Colors.white,
label: TranslationBase.of(context).save,
disabled: (!isAgree || !isSummary),
onTap: () async {
final form = formKey.currentState;
if (form.validate()) {
GifLoaderDialogUtils.showMyDialog(context);
await model.updatePatientHealthSummaryReport(
message: TranslationBase.of(context).updateSuccessfully, isSummary: isSummary, isUpdateEmail: true, email: email.isNotEmpty ? email : model.user.emailAddress);
model.receiveHealthSummaryReport = isSummary;
model.user.emailAddress = email.isNotEmpty ? email : model.user.emailAddress;
GifLoaderDialogUtils.hideDialog(context);
}
),
SizedBox(
height: 12,
),
RichText(
text: TextSpan(
text: TranslationBase.of(context).toViewTheTermsAndConditions + " ",
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
children: [
TextSpan(
text: TranslationBase.of(context).clickHere,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.blue, letterSpacing: -0.64, height: 23 / 16),
recognizer: new TapGestureRecognizer()
..onTap = () => Navigator.push(
context,
FadePage(
page: UserAgreementContent(),
),
),
)
]),
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Checkbox(
value: isAgree,
onChanged: (value) {
setState(() {
isAgree = !isAgree;
});
},
activeColor: Color(0xffD02127),
),
),
Padding(
padding: const EdgeInsets.all(5.0),
child: Texts(
TranslationBase.of(context).instructionAgree,
fontWeight: FontWeight.normal,
Text(
TranslationBase.of(context).iAgreeToTheTermsAndConditions,
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w400, color: Color(0xff2B353E), letterSpacing: -0.56, height: 21 / 14),
),
),
SizedBox(
height: 12,
),
Center(child: Image.asset('assets/images/report.jpg'))
],
),
],
),
DefaultButton(
TranslationBase.of(context).save,
() async {
final form = formKey.currentState;
if (form.validate()) {
GifLoaderDialogUtils.showMyDialog(context);
await model.updatePatientHealthSummaryReport(
message: TranslationBase.of(context).updateSuccessfully, isSummary: isSummary, isUpdateEmail: true, email: email.isNotEmpty ? email : model.user.emailAddress);
model.receiveHealthSummaryReport = isSummary;
model.user.emailAddress = email.isNotEmpty ? email : model.user.emailAddress;
GifLoaderDialogUtils.hideDialog(context);
}
},
),
SizedBox(height: 12),
Text(
TranslationBase.of(context).instructionAgree,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
SizedBox(height: 12),
Center(child: Image.asset('assets/images/report.jpg'))
],
),
),
),

@ -56,6 +56,7 @@ class _HomeReportPageState extends State<HomeReportPage> with SingleTickerProvid
baseViewModel: model,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: Color(0xffF7F7F7),
imagesInfo: imagesInfo,
body: Column(
children: [

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/reports/Reports.dart';
import 'package:diplomaticquarterapp/core/service/medical/reports_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -12,6 +13,7 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart';
class ReportListWidget extends StatelessWidget {
@ -20,8 +22,11 @@ class ReportListWidget extends StatelessWidget {
ReportListWidget({@required this.reportList, this.emailAddress});
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return ListView.separated(
physics: BouncingScrollPhysics(),
padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
@ -69,8 +74,8 @@ class ReportListWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
if (report.projectName != null) myRichText(TranslationBase.of(context).clinic + ":", report.projectName),
if (report.clinicDescription != null) myRichText(TranslationBase.of(context).hospital + ":", report.clinicDescription),
if (report.projectName != null) myRichText(TranslationBase.of(context).clinic + ":", report.projectName, projectViewModel.isArabic),
if (report.clinicDescription != null) myRichText(TranslationBase.of(context).hospital + ":", report.clinicDescription, projectViewModel.isArabic),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,

@ -5,26 +5,28 @@ import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/StarRating.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart';
class MedicalReports extends StatelessWidget {
@override
Widget build(BuildContext context) {
void confirmBox(
AppointmentHistory model, ReportsViewModel reportsViewModel) {
void confirmBox(AppointmentHistory model, ReportsViewModel reportsViewModel) {
showDialog(
context: context,
child: ConfirmDialog(
appointmentHistory: model,
onOkSelected: (model) => reportsViewModel.insertRequestForMedicalReport(model,TranslationBase.of(context).successSendReport),
onOkSelected: (model) => reportsViewModel.insertRequestForMedicalReport(model, TranslationBase.of(context).successSendReport),
),
);
}
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<ReportsViewModel>(
onModelReady: (model) => model.getPatentAppointmentHistory(),
@ -32,88 +34,175 @@ class MedicalReports extends StatelessWidget {
baseViewModel: model,
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).medReport,
body: ListView.builder(
itemCount: model.appointHistoryList.length,
itemBuilder: (context, index) => Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
width: double.infinity,
margin: EdgeInsets.only(left: 8, right: 8, top: 3),
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.white, width: 2),
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(
Radius.circular(8.0),
)),
child: Row(
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 5, right: 5),
child: LargeAvatar(
width: 50,
height: 50,
name: model.appointHistoryList[index].doctorNameObj,
url: model.appointHistoryList[index].doctorImageURL,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: Color(0xffF7F7F7),
body: ListView.separated(
physics: BouncingScrollPhysics(),
itemCount: model.appointHistoryList.length,
padding: EdgeInsets.all(21),
separatorBuilder: (context, index) => SizedBox(height: 14),
itemBuilder: (context, index) {
AppointmentHistory _appointmenHistory = model.appointHistoryList[index];
return InkWell(
onTap: () => confirmBox(model.appointHistoryList[index], model),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
//spreadRadius: 5,
blurRadius: 27,
offset: Offset(0, -3),
),
],
color: Colors.white),
child: Padding(
padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
if ((_appointmenHistory.doctorName ?? _appointmenHistory.doctorNameObj) != null)
Text(
(_appointmenHistory.doctorName ?? _appointmenHistory.doctorNameObj),
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
Text(
DateUtil.formatDateToDate(_appointmenHistory.appointmentDate, projectViewModel.isArabic),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
],
),
if ((_appointmenHistory.doctorName ?? _appointmenHistory.doctorNameObj) != null) SizedBox(height: 6),
Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
LargeAvatar(
name: _appointmenHistory.doctorName,
url: _appointmenHistory.doctorImageURL,
width: 48,
height: 48,
),
SizedBox(width: 11),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
if (_appointmenHistory.projectName != null) myRichText(TranslationBase.of(context).clinic + ":", _appointmenHistory.projectName, projectViewModel.isArabic),
if (_appointmenHistory.clinicName != null) myRichText(TranslationBase.of(context).hospital + ":", _appointmenHistory.clinicName, projectViewModel.isArabic),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
RatingBar.readOnly(
initialRating: _appointmenHistory.actualDoctorRate.toDouble(),
size: 16.0,
filledColor: Color(0XFFD02127),
emptyColor: Color(0XFFD02127),
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star_border,
),
Icon(Icons.email, color: Color(0xff2B353E))
],
),
],
),
),
],
),
],
),
),
Expanded(
flex: 4,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 12,
),
Texts(model.appointHistoryList[index].projectName),
Texts(model.appointHistoryList[index].clinicName),
Texts(projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(model.appointHistoryList[index].appointmentDate):DateUtil.getMonthDayYearDateFormatted(model.appointHistoryList[index].appointmentDate)),
StarRating(
totalAverage: model
.appointHistoryList[index].actualDoctorRate
.toDouble(),
forceStars: true),
SizedBox(
height: 12,
),
],
),
);
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
blurRadius: 27,
offset: Offset(0, -3),
),
],
color: Colors.white),
child: Row(
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 5, right: 5),
child: LargeAvatar(
width: 50,
height: 50,
name: model.appointHistoryList[index].doctorNameObj,
url: model.appointHistoryList[index].doctorImageURL,
),
),
),
InkWell(
onTap: () =>
confirmBox(model.appointHistoryList[index], model),
child: Container(
width: 120,
height: 50,
decoration: BoxDecoration(
color: Colors.black54,
border:
Border.all(color: Colors.transparent, width: 2),
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(
Radius.circular(8.0),
Expanded(
flex: 4,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 12,
),
Texts(model.appointHistoryList[index].projectName),
Texts(model.appointHistoryList[index].clinicName),
Texts(projectViewModel.isArabic
? DateUtil.getMonthDayYearDateFormattedAr(model.appointHistoryList[index].appointmentDate)
: DateUtil.getMonthDayYearDateFormatted(model.appointHistoryList[index].appointmentDate)),
StarRating(totalAverage: model.appointHistoryList[index].actualDoctorRate.toDouble(), forceStars: true),
SizedBox(
height: 12,
),
],
),
),
child: Center(
child: Texts(
TranslationBase.of(context).requestReport,
fontSize: 12,
color: Colors.white,
),
InkWell(
onTap: () => confirmBox(model.appointHistoryList[index], model),
child: Container(
width: 120,
height: 50,
decoration: BoxDecoration(
color: Colors.black54,
border: Border.all(color: Colors.transparent, width: 2),
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(
Radius.circular(8.0),
),
),
child: Center(
child: Texts(
TranslationBase.of(context).requestReport,
fontSize: 12,
color: Colors.white,
),
),
),
),
),
SizedBox(
width: 12,
),
],
),
),
),
),
SizedBox(
width: 12,
),
],
),
);
}),
),
);
}

@ -13,11 +13,13 @@ class UserAgreementContent extends StatelessWidget {
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
baseViewModel: model,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: Color(0xffF7F7F7),
appBarTitle: TranslationBase.of(context).userAgreement,
body: SingleChildScrollView(
child: Html(
data: model.userAgreementContent,
),
physics: BouncingScrollPhysics(),
child: Html(data: model.userAgreementContent),
),
),
);

@ -1,9 +1,13 @@
import 'dart:io';
import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/health_data_list.dart';
import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -19,10 +23,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
bool hasAlreadySynced = false;
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
getLastPatientRecord(context);
if(authenticatedUserObject.isLogin) getLastPatientRecord(context);
});
super.initState();
}
@ -32,6 +39,12 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
return AppScaffold(
appBarTitle: "Sync Health Data",
isShowAppBar: true,
isShowDecPage: true,
description: TranslationBase.of(context).infoHealthData,
imagesInfo: [
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/ar/0.png'),
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/ar/1.png')
],
body: Container(
child: Platform.isIOS
? _getAppleWatchInstructions()

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
@ -14,15 +15,13 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class RateAppointmentClinic extends StatefulWidget {
final AppointmentDetails appointmentDetails;
final String doctorNote;
final int doctorRate;
RateAppointmentClinic(
{this.appointmentDetails, this.doctorRate, this.doctorNote});
RateAppointmentClinic({this.appointmentDetails, this.doctorRate, this.doctorNote});
@override
_RateAppointmentClinicState createState() => _RateAppointmentClinicState();
@ -43,8 +42,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
appBar: AppBar(
elevation: 0,
textTheme: TextTheme(
headline6:
TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
headline6: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
),
title: Text('Rate'),
leading: Builder(
@ -91,11 +89,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
height: 8,
),
LargeAvatar(
url:
'https://hmgwebservices.com/Images/Hospitals/' +
model.appointmentDetails.projectID
.toString() +
'.jpg',
url: 'https://hmgwebservices.com/Images/Hospitals/' + model.appointmentDetails.projectID.toString() + '.jpg',
name: model.appointmentDetails.clinicName,
width: 110,
height: 110,
@ -112,9 +106,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
height: 4,
),
Texts(
DateUtil.getMonthDayYearDateFormatted(
DateUtil.convertStringToDate(
model.appointmentDetails.appointmentDate)),
DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(model.appointmentDetails.appointmentDate)),
),
SizedBox(
height: 8,
@ -146,10 +138,8 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
duration: Duration(milliseconds: 1000),
switchInCurve: Curves.elasticOut,
switchOutCurve: Curves.elasticIn,
transitionBuilder:
(Widget child, Animation<double> animation) {
return ScaleTransition(
child: child, scale: animation);
transitionBuilder: (Widget child, Animation<double> animation) {
return ScaleTransition(child: child, scale: animation);
},
child: Container(
key: ValueKey<int>(rating),
@ -162,9 +152,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
},
iconSize: rating == (index + 1) ? 60 : 40,
// Theme.of(context).hintColor,
icon: Image.asset('assets/images/' +
(index + 1).toString() +
'.png')),
icon: Image.asset('assets/images/' + (index + 1).toString() + '.png')),
),
),
)
@ -192,25 +180,33 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
if (rating > 0) {
model
.sendAppointmentRate(
rating,
widget.appointmentDetails.appointmentNo,
widget.appointmentDetails.projectID,
widget.appointmentDetails.doctorID,
widget.appointmentDetails.clinicID,
note)
rating, widget.appointmentDetails.appointmentNo, widget.appointmentDetails.projectID, widget.appointmentDetails.doctorID, widget.appointmentDetails.clinicID, note)
.then(
(value) => {
Navigator.pushReplacement(
context,
FadePage(
page: LandingPage(),
),
)
model
.sendDoctorRate(
widget.doctorRate,
widget.appointmentDetails.appointmentNo,
widget.appointmentDetails.projectID,
widget.appointmentDetails.doctorID,
widget.appointmentDetails.clinicID,
note,
widget.appointmentDetails.appointmentDate,
widget.appointmentDetails.doctorName,
widget.appointmentDetails.projectName,
widget.appointmentDetails.clinicName)
.then((value) {
Navigator.pushReplacement(
context,
FadePage(
page: LandingPage(),
),
);
}),
},
);
} else {
AppToast.showErrorToast(
message: 'please rate the clinic');
AppToast.showErrorToast(message: 'please rate the clinic');
}
},
label: TranslationBase.of(context).submit,

@ -1,19 +1,19 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/vaccine_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../base/base_view.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/core/viewModels/vaccine_view_model.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
import 'package:popup_box/popup_box.dart';
import '../base/base_view.dart';
import 'my_vaccines_item_screen.dart';
//TODO fix by jammal we have a static data
@ -28,192 +28,164 @@ class _MyVaccinesState extends State<MyVaccines> {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<VaccineViewModel>(
onModelReady: (model) => model.getVaccine(),
builder: (BuildContext context, VaccineViewModel model, Widget child) =>
AppScaffold(
isShowAppBar: true,
baseViewModel: model,
appBarTitle: TranslationBase.of(context).myVaccines,
body: Container(
margin: EdgeInsets.only(
left: SizeConfig.screenWidth * 0.004,
right: SizeConfig.screenWidth * 0.004,
top: SizeConfig.screenWidth * 0.04,
),
child: Column(
children: <Widget>[
RoundedContainer(
backgroundColor: Colors.white,
child: ExpansionTile(
title: Container(
height: 65.0,
child: Text('2018'),
),
children: <Widget>[
Container(
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.vaccineList == null
? 0
: model.vaccineList.length,
itemBuilder: (BuildContext context, int index) {
return Column(
children: <Widget>[
RoundedContainer(
child: Column(
builder: (BuildContext context, VaccineViewModel model, Widget child) => AppScaffold(
isShowAppBar: true,
baseViewModel: model,
appBarTitle: TranslationBase.of(context).myVaccines,
description: TranslationBase.of(context).infoVaccines,
imagesInfo: [
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vacceines/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vacceines/ar/0.png')
],
body: Container(
margin: EdgeInsets.only(
left: SizeConfig.screenWidth * 0.004,
right: SizeConfig.screenWidth * 0.004,
top: SizeConfig.screenWidth * 0.04,
),
child: Column(
children: <Widget>[
RoundedContainer(
backgroundColor: Colors.white,
child: ExpansionTile(
title: Container(
height: 65.0,
child: Text('2018'),
),
children: <Widget>[
Container(
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.vaccineList == null ? 0 : model.vaccineList.length,
itemBuilder: (BuildContext context, int index) {
return Column(
children: <Widget>[
RoundedContainer(
child: Column(
children: <Widget>[
Row(
children: <Widget>[
Row(
children: <Widget>[
Expanded(
child: Column(
children: <Widget>[
Padding(
padding: EdgeInsets
.symmetric(
horizontal:
20.0,
vertical: 20.0),
child: Image.network(
model
.vaccineList[
index]
.doctorImageURL,
height: SizeConfig
.imageSizeMultiplier *
23,
width: SizeConfig
.imageSizeMultiplier *
20,
fit: BoxFit.fill,
),
),
],
),
flex: 2,
),
Expanded(
child: Container(
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <Widget>[
Text(
model
.vaccineList[
index]
.doctorTitle +
model
.vaccineList[
index]
.doctorName,
style: TextStyle(
fontWeight:
FontWeight.w900,
fontSize: 16.6,
),
),
SizedBox(height: 7.0),
Text(
model
.vaccineList[
index]
.projectName,
style: TextStyle(
fontSize: 17.0,
letterSpacing: 0.5,
),
),
SizedBox(height: 7.0),
Text(
model
.vaccineList[
index]
.vaccineName,
style: TextStyle(
fontSize: 17.0,
),
),
SizedBox(height: 7.0),
Text(
'Date Taken ' +
convertDateFormat(model
.vaccineList[
index]
.invoiceDate),
style: TextStyle(
fontSize: 17.0),
),
],
Expanded(
child: Column(
children: <Widget>[
Padding(
padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 20.0),
child: Image.network(
model.vaccineList[index].doctorImageURL,
height: SizeConfig.imageSizeMultiplier * 23,
width: SizeConfig.imageSizeMultiplier * 20,
fit: BoxFit.fill,
),
),
flex: 5,
],
),
flex: 2,
),
Expanded(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
model.vaccineList[index].doctorTitle + model.vaccineList[index].doctorName,
style: TextStyle(
fontWeight: FontWeight.w900,
fontSize: 16.6,
),
),
SizedBox(height: 7.0),
Text(
model.vaccineList[index].projectName,
style: TextStyle(
fontSize: 17.0,
letterSpacing: 0.5,
),
),
SizedBox(height: 7.0),
Text(
model.vaccineList[index].vaccineName,
style: TextStyle(
fontSize: 17.0,
),
),
SizedBox(height: 7.0),
Text(
'Date Taken ' + convertDateFormat(model.vaccineList[index].invoiceDate),
style: TextStyle(fontSize: 17.0),
),
],
),
],
),
flex: 5,
),
],
),
),
],
);
}),
)
],
),
),
// SpaceBetweenTexts(space: 165.0),
],
],
),
),
],
);
}),
)
],
),
),
),
bottomSheet: model.state == ViewState.Busy?Container(height: 0,): model.vaccineList.length > 0
// SpaceBetweenTexts(space: 165.0),
],
),
),
bottomSheet: model.state == ViewState.Busy
? Container(
height: 0,
)
: model.vaccineList.length > 0
? Container(
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12),
height: MediaQuery.of(context).size.height * 0.25,
width: double.infinity,
child: Column(
children: [
Divider(
height: 2,
thickness: 1,
),
SizedBox(
height: 6,
),
Container(
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12),
height: MediaQuery.of(context).size.height * 0.25,
width: double.infinity,
// height: 80.0,
child: Button(
disabled: true,
label: TranslationBase.of(context)
.checkVaccineAvailability,
backgroundColor: Color(0xff9EA3A4),
onTap: () => Navigator.push(
context, FadePage(page: MyVaccinesItemPage())),
child: Column(
children: [
Divider(
height: 2,
thickness: 1,
),
SizedBox(
height: 6,
),
Container(
width: double.infinity,
// height: 80.0,
child: Button(
disabled: true,
label: TranslationBase.of(context).checkVaccineAvailability,
backgroundColor: Color(0xff9EA3A4),
onTap: () => Navigator.push(context, FadePage(page: MyVaccinesItemPage())),
),
),
if (projectViewModel.havePrivilege(27))
Container(
width: double.infinity,
// height: 80.0,
child: SecondaryButton(
label: TranslationBase.of(context).sendEmail,
color: Color(0xffF62426),
textColor: Colors.white,
disabled: model.vaccineList.length == 0,
loading: model.state == ViewState.BusyLocal,
onTap: () async {
model.sendEmail(message: TranslationBase.of(context).emailSentSuccessfully);
},
),
),
],
),
)
: Container(
height: 0,
),
if (projectViewModel.havePrivilege(27))
Container(
width: double.infinity,
// height: 80.0,
child: SecondaryButton(
label: TranslationBase.of(context).sendEmail,
color: Color(0xffF62426),
textColor: Colors.white,
disabled: model.vaccineList.length == 0,
loading: model.state == ViewState.BusyLocal,
onTap: () async {
model.sendEmail(
message: TranslationBase.of(context)
.emailSentSuccessfully);
},
),
),
],
),
)
: Container(height: 0,),
),
),
);
}
@ -224,13 +196,8 @@ class _MyVaccinesState extends State<MyVaccines> {
final startIndex = Date.indexOf(start);
final endIndex = Date.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(Date.substring(startIndex + start.length, endIndex)));
String newDate = date.year.toString() +
"-" +
date.month.toString().padLeft(2, '0') +
"-" +
date.day.toString().padLeft(2, '0');
var date = new DateTime.fromMillisecondsSinceEpoch(int.parse(Date.substring(startIndex + start.length, endIndex)));
String newDate = date.year.toString() + "-" + date.month.toString().padLeft(2, '0') + "-" + date.day.toString().padLeft(2, '0');
return newDate.toString();
}

@ -130,8 +130,8 @@ class DoctorsListService extends BaseService {
"gender": authUser.gender != null ? authUser.gender : 0,
"age": authUser.age != null ? authUser.age : 0,
"IsGetNearAppointment": false,
"Latitude": lat,
"Longitude": long,
"Latitude": lat == null ? 0.0 : lat,
"Longitude": long == null ? 0.0 : long,
"License": true
};

@ -15,5 +15,6 @@ class CustomColors {
static const Color pharmacyGreyColor = Color(0xFFDBDBDB);
static const Color backgroudGreyColor = Color(0xFFEFEFEF);
static const Color appBackgroudGreyColor = Color(0xFFF7F7F7);
static const Color appBackgroudGrey2Color = Color(0xFFF8F8F8);
static const Color green = Color(0xFF359846);
}

@ -52,8 +52,8 @@ class DateUtil {
return start + "$milliseconds" + end;
}
static String formatDateToDate(DateTime date) {
return DateFormat('dd MMM yyy').format(date);
static String formatDateToDate(DateTime date, bool isArabic) {
return DateFormat('dd MMM yyy', isArabic ? "ar_SA" : "en_US").format(date);
}
static String formatDateToTime(DateTime date) {

@ -2142,7 +2142,28 @@ class TranslationBase {
String get aboutApp => localizedValues["about-app"][locale.languageCode];
String get aboutPointsLength => localizedValues["about-points"]['length'][locale.languageCode];
String get timeNeeded => localizedValues["time-needed"][locale.languageCode];
String get totalTimeNeeded => localizedValues["total-time-needed"][locale.languageCode];
String get totalTimeNeeded =>
localizedValues["total-time-needed"][locale.languageCode];
String get infoEye =>
localizedValues["info-eye"][locale.languageCode];
String get infoVaccines =>
localizedValues["info-vaccines"][locale.languageCode];
String get infoTrackers =>
localizedValues["info-trackers"][locale.languageCode];
String get infoHealthData =>
localizedValues["info-health-data"][locale.languageCode];
String get infoAskDoc =>
localizedValues["info-ask-doc"][locale.languageCode];
String get infoAutoWifi =>
localizedValues["info-auto-wifi"][locale.languageCode];
String get autoWifi =>
localizedValues["auto-wifi"][locale.languageCode];
String get childVaccineInfo =>
localizedValues["child-vaccine-info"][locale.languageCode];
String get h2oInfo =>
localizedValues["h2o-info"][locale.languageCode];
String get askDocEmpty =>
localizedValues["ask-doc-empty"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -7,6 +7,7 @@ import 'package:badges/badges.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:connectivity/connectivity.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
@ -31,15 +32,16 @@ import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/not_auh_page.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart';
import 'package:url_launcher/url_launcher.dart';
import '../Constants.dart';
import 'app_shared_preferences.dart';
import 'app_toast.dart';
@ -407,12 +409,12 @@ class Utils {
),
));
medical.add(MedicalProfileItem(
title: TranslationBase.of(context).patientCall,
imagePath: 'medical_history_icon.png',
subTitle: TranslationBase.of(context).patientCallSubtitle,
isEnable: projectViewModel.havePrivilege(61),
));
// medical.add(MedicalProfileItem(
// title: TranslationBase.of(context).patientCall,
// imagePath: 'medical_history_icon.png',
// subTitle: TranslationBase.of(context).patientCallSubtitle,
// isEnable: projectViewModel.havePrivilege(61),
// ));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(24) ? Navigator.push(context, FadePage(page: MyTrackers())) : null,
@ -766,21 +768,26 @@ class Utils {
if (projectViewModel.havePrivilege(32) || true) {
medical.add(InkWell(
onTap: () {
userData().then((userData_) {
if (projectViewModel.isLogin && userData_ != null) {
if (projectViewModel.isLogin) {
userData().then((userData_) {
String patientID = userData_.patientID.toString();
GifLoaderDialogUtils.showMyDialog(context);
projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)});
} else {
AlertDialogBox(
context: context,
confirmMessage: "Please login with your account first to use this feature",
okText: "OK",
okFunction: () {
AlertDialogBox.closeAlertDialog(context);
}).showAlertDialog(context);
}
});
});
} else {
Navigator.push(
context,
FadePage(
page: NotAutPage(
title: TranslationBase.of(context).autoWifi,
description: TranslationBase.of(context).infoAutoWifi,
infoList: [],
imagesInfo: [
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/connect-to/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/connect-to/ar/0.png'),
],
)));
}
},
child: MedicalProfileItem(
title: TranslationBase.of(context).internet,
@ -845,14 +852,14 @@ class Utils {
);
}
static Widget tableColumnValue(String text, {bool isLast = false}) {
static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true}) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 12),
Text(
text.toLowerCase().capitalizeFirstofEach,
isCapitable ? text.toLowerCase().capitalizeFirstofEach : text,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
SizedBox(height: 12),

@ -15,16 +15,12 @@ import 'package:provider/provider.dart';
import '../../d_q_icons_icons.dart';
import 'bottom_navigation_item.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
class BottomNavBar extends StatefulWidget {
final ValueChanged<int> changeIndex;
final int index;
final bool showHomeIcon;
BottomNavBar(
{Key key, this.changeIndex, this.index, this.showHomeIcon = false})
: super(key: key);
BottomNavBar({Key key, this.changeIndex, this.index, this.showHomeIcon = false}) : super(key: key);
@override
_BottomNavBarState createState() => _BottomNavBarState();
@ -36,7 +32,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
var event = RobotProvider();
_changeIndex(int index) async {
widget.changeIndex(index);
if (index == 0) {
if (index == 5) {
event.setValue({'isRobotVisible': 'true'});
}
}
@ -114,8 +110,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
// currentIndex: 2,
// name: TranslationBase.of(context).bookAppo,
// ),
if (/*widget.index == 0 && */ projectViewModel
.havePrivilege(34))
if (/*widget.index == 0 && */ projectViewModel.havePrivilege(34))
BottomNavigationItem(
icon: EvaIcons.calendar,
activeIcon: EvaIcons.calendar,
@ -130,7 +125,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
activeIcon: DQIcons.roboticon,
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 0,
currentIndex: 5,
name: TranslationBase.of(context).help,
)
],

@ -2,7 +2,6 @@ import 'package:badges/badges.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

@ -14,7 +14,6 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import '../../text.dart';
import 'FlowChartPage.dart';
@ -116,7 +115,7 @@ class LabResultWidget extends StatelessWidget {
openPassportUpdatePage(BuildContext context) {
Navigator.push(context, FadePage(page: PassportUpdatePage())).then((value) {
print(value);
if(value != null && value == true) {
if (value != null && value == true) {
showConfirmMessage(context, projectViewModel.user.emailAddress, "yes");
}
});
@ -179,7 +178,7 @@ class LabResultWidget extends StatelessWidget {
children: [
Utils.tableColumnValue(labResultList[i].description, isLast: i == (labResultList.length - 1)),
Utils.tableColumnValue(labResultList[i].resultValue + " " + labResultList[i].uOM, isLast: i == (labResultList.length - 1)),
Utils.tableColumnValue(labResultList[i].referanceRange, isLast: i == (labResultList.length - 1)),
Utils.tableColumnValue(labResultList[i].referanceRange, isLast: i == (labResultList.length - 1), isCapitable: false),
],
),
);

@ -49,7 +49,7 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
tableRow.add(
TableRow(
children: [
Utils.tableColumnValue(DateUtil.formatDateToDate(DateUtil.convertStringToDate(labOrderResultList[i].verifiedOnDateTime)), isLast: i == (labOrderResultList.length - 1)),
Utils.tableColumnValue(DateUtil.formatDateToDate(DateUtil.convertStringToDate(labOrderResultList[i].verifiedOnDateTime), false), isLast: i == (labOrderResultList.length - 1)),
Utils.tableColumnValue(labOrderResultList[i].resultValue, isLast: i == (labOrderResultList.length - 1)),
],
),

@ -46,9 +46,11 @@ class DoctorCard extends StatelessWidget {
this.remainingTimeInMinutes,
this.isParentAppointment = false});
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
projectViewModel = Provider.of(context);
return Container(
height: 120,
decoration: BoxDecoration(
@ -127,7 +129,7 @@ class DoctorCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
DateUtil.formatDateToDate(date),
DateUtil.formatDateToDate(date, projectViewModel.isArabic),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
Text(
@ -155,11 +157,11 @@ class DoctorCard extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
myRichText(isSortByClinic ? TranslationBase.of(context).hospital : TranslationBase.of(context).clinic + ":", subName),
myRichText(isSortByClinic ? TranslationBase.of(context).hospital : TranslationBase.of(context).clinic + ":", subName, projectViewModel.isArabic),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
if (rating == null) myRichText(TranslationBase.of(context).invoiceNo, billNo ?? ""),
if (rating == null) myRichText(TranslationBase.of(context).invoiceNo, billNo ?? "", projectViewModel.isArabic),
if (rating != null)
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -216,13 +218,13 @@ class DoctorCard extends StatelessWidget {
}
// todo 'sikander' move this widget to separate file
Widget myRichText(String title, String value) {
Widget myRichText(String title, String value, bool isArabic) {
return RichText(
maxLines: 1,
text: TextSpan(text: title, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 18 / 10), children: <TextSpan>[
text: TextSpan(text: title, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff575757), letterSpacing: -0.4, height: 18 / 10), children: <TextSpan>[
TextSpan(
text: " $value",
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
)
]),
);

@ -13,7 +13,7 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/list/flexible_container.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart' as auth;
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:equatable/equatable.dart';
import 'package:flutter/material.dart';
@ -34,7 +34,7 @@ class _TimeLineViewState extends State<TimeLineView> {
List<AppoitmentAllHistoryResultList> tempList = [];
List<DateObj> dateObjs = [];
DateObj selectedDateObj = null;
final authService = new auth.AuthProvider();
@override
void initState() {
super.initState();
@ -277,9 +277,29 @@ class _TimeLineViewState extends State<TimeLineView> {
}
login() async {
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
var data = await sharedPref.getObject(IMEI_USER_DATA);
sharedPref.remove(REGISTER_DATA_FOR_LOGIIN);
if (data != null) {
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
GifLoaderDialogUtils.showMyDialog(context);
authService.selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES value) {
GifLoaderDialogUtils.hideDialog(context);
if (value != null) {
sharedPref.setObject(IMEI_USER_DATA, value);
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
});
}
}
}

@ -1,23 +1,24 @@
import 'dart:io';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/service/privilege_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notifications_page.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
@ -32,11 +33,10 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
import '../../config/size_config.dart';
import '../../locator.dart';
import 'drawer_item_widget.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
class AppDrawer extends StatefulWidget {
@override
@ -59,10 +59,12 @@ class _AppDrawerState extends State<AppDrawer> {
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
VitalSignService _vitalSignService = locator<VitalSignService>();
AppointmentRateViewModel appointmentRateViewModel = locator<AppointmentRateViewModel>();
PrivilegeService _privilegeService = locator<PrivilegeService>();
ToDoCountProviderModel toDoProvider;
String booldType;
String notificationCount;
final authService = new AuthProvider();
@override
Widget build(BuildContext context) {
projectProvider = Provider.of(context);
@ -152,6 +154,7 @@ class _AppDrawerState extends State<AppDrawer> {
Padding(child: Image.asset('assets/images/lang.png'), padding: EdgeInsets.all(3)),
isImageIcon: true,
bottomLine: false,
projectProvider: projectProvider,
),
onTap: () {
sharedPref.setBool(IS_ROBOT_INIT, null);
@ -179,6 +182,7 @@ class _AppDrawerState extends State<AppDrawer> {
iconColor: Theme.of(context).textTheme.bodyText1.color,
sideArrow: true,
letterSpacing: -0.84,
projectProvider: projectProvider
),
onTap: () {
Navigator.of(context).pop();
@ -310,8 +314,10 @@ class _AppDrawerState extends State<AppDrawer> {
letterSpacing: -0.84,
fontSize: 14,
fontHeight: projectProvider.isArabic ? 1 : 0.8,
projectProvider: projectProvider
),
onTap: () {
sharedPref.remove(APPOINTMENT_HISTORY_MEDICAL);
sharedPref.setBool(IS_ROBOT_INIT, null);
if (projectProvider.isArabic) {
projectProvider.changeLanguage('en');
@ -330,6 +336,7 @@ class _AppDrawerState extends State<AppDrawer> {
bottomLine: false,
letterSpacing: -0.84,
fontSize: 14,
projectProvider: projectProvider,
count: notificationCount != null
? new Container(
padding: EdgeInsets.all(4),
@ -371,6 +378,7 @@ class _AppDrawerState extends State<AppDrawer> {
bottomLine: false,
letterSpacing: -0.84,
fontSize: 14,
projectProvider: projectProvider
),
onTap: () {
Navigator.of(context).pushNamed(
@ -385,6 +393,7 @@ class _AppDrawerState extends State<AppDrawer> {
bottomLine: false,
letterSpacing: -0.84,
fontSize: 14,
projectProvider: projectProvider
),
onTap: () {
if (Platform.isIOS) {
@ -402,6 +411,7 @@ class _AppDrawerState extends State<AppDrawer> {
bottomLine: false,
letterSpacing: -0.84,
fontSize: 14,
projectProvider: projectProvider
),
onTap: () {
logout();
@ -417,6 +427,7 @@ class _AppDrawerState extends State<AppDrawer> {
letterSpacing: -0.84,
fontSize: 14,
bottomLine: false,
projectProvider: projectProvider
),
onTap: () {
login();
@ -496,9 +507,12 @@ class _AppDrawerState extends State<AppDrawer> {
await authenticatedUserObject.getUser();
_vitalSignService.heightCm = "";
_vitalSignService.weightKg = "";
await _privilegeService.getPrivilege();
projectProvider.setPrivilegeModelList(privilege: _privilegeService.privilegeModelList);
var appLanguage = await sharedPref.getString(APP_LANGUAGE);
await sharedPref.clear();
await sharedPref.setString(APP_LANGUAGE, appLanguage);
await sharedPref.remove(APPOINTMENT_HISTORY_MEDICAL);
this.user = null;
Navigator.of(context).pushNamed(HOME);
// projectProvider.platformBridge().unRegisterHmgGeofences();

@ -1,6 +1,7 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/material.dart';
@ -19,9 +20,10 @@ class DrawerItem extends StatefulWidget {
final double fontHeight;
final double letterSpacing;
final double fontSize;
final ProjectViewModel projectProvider;
DrawerItem(this.title, this.icon,
{this.fontSize, this.letterSpacing, this.textColor, this.iconColor, this.subTitle = '', this.bottomLine = true, this.count, this.sideArrow = false, this.isImageIcon = false, this.fontHeight});
{this.fontSize, this.letterSpacing, this.textColor, this.iconColor, this.subTitle = '', this.bottomLine = true, this.count, this.sideArrow = false, this.isImageIcon = false, this.fontHeight, this.projectProvider});
@override
_DrawerItemState createState() => _DrawerItemState();
@ -76,7 +78,7 @@ class _DrawerItemState extends State<DrawerItem> {
)
: SizedBox(),
])),
widget.sideArrow == true ? Expanded(flex: 1, child: Icon(Icons.keyboard_arrow_right, color: Colors.black)) : Expanded(flex: 1, child: SizedBox()),
widget.sideArrow == true ? Expanded(flex: 1, child: Icon(widget.projectProvider.isArabic ? Icons.keyboard_arrow_left : Icons.keyboard_arrow_right, color: Colors.black)) : Expanded(flex: 1, child: SizedBox()),
],
),
));

@ -167,6 +167,8 @@ class MyInAppBrowser extends InAppBrowser {
AuthenticatedUser authenticatedUser,
InAppBrowser browser,
bool isLiveCareAppo,
var servID,
var LiveServID,
[var appoDate,
var appoNo,
var clinicID,
@ -185,6 +187,8 @@ class MyInAppBrowser extends InAppBrowser {
patientID,
authenticatedUser,
isLiveCareAppo,
servID,
LiveServID,
appoDate,
appoNo,
clinicID,
@ -232,13 +236,13 @@ class MyInAppBrowser extends InAppBrowser {
dynamic patientID,
AuthenticatedUser authUser,
bool isLiveCareAppo,
var servID,
var LiveServID,
[var appoDate,
var appoNo,
var clinicID,
var doctorID,
var patientData,
var servID,
var LiveServID]) async {
var patientData]) async {
getDeviceToken();
String currentLanguageID = getLanguageID() == 'ar' ? 'AR' : 'EN';
String form = isLiveCareAppo ? getLiveCareForm() : getForm();

@ -13,32 +13,21 @@ class CustomSwitch extends StatefulWidget {
final Color activeColor;
final Color inactiveColor;
CustomSwitch(
{Key key,
this.value,
this.onChanged,
this.activeColor,
this.inactiveColor})
: super(key: key);
CustomSwitch({Key key, this.value, this.onChanged, this.activeColor, this.inactiveColor}) : super(key: key);
@override
_CustomSwitchState createState() => _CustomSwitchState();
}
class _CustomSwitchState extends State<CustomSwitch>
with SingleTickerProviderStateMixin {
class _CustomSwitchState extends State<CustomSwitch> with SingleTickerProviderStateMixin {
Animation _circleAnimation;
AnimationController _animationController;
@override
void initState() {
super.initState();
_animationController =
AnimationController(vsync: this, duration: Duration(milliseconds: 500));
_circleAnimation = Tween(begin: 0.0, end: 30.0).animate(CurvedAnimation(
parent: _animationController,
curve: Curves.easeOutQuint,
reverseCurve: Curves.easeInQuint));
_animationController = AnimationController(vsync: this, duration: Duration(milliseconds: 500));
_circleAnimation = Tween(begin: 0.0, end: 22.0).animate(CurvedAnimation(parent: _animationController, curve: Curves.easeOutQuint, reverseCurve: Curves.easeInQuint));
if (widget.value) _animationController.forward();
}
@ -47,6 +36,7 @@ class _CustomSwitchState extends State<CustomSwitch>
return AnimatedBuilder(
animation: _animationController,
builder: (context, child) {
bool _switchStatus = _circleAnimation.status == AnimationStatus.dismissed || _circleAnimation.status == AnimationStatus.reverse;
return GestureDetector(
onTap: Feedback.wrapForTap(() async {
if (widget.value) {
@ -58,29 +48,18 @@ class _CustomSwitchState extends State<CustomSwitch>
}, context),
child: AnimatedContainer(
duration: Duration(milliseconds: 200),
width: 60.0,
height: 30.0,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20.0),
color: _circleAnimation.status == AnimationStatus.dismissed ||
_circleAnimation.status == AnimationStatus.reverse
? widget.inactiveColor
: widget.activeColor),
width: 50.0,
height: 25.0,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.0), color: _switchStatus ? widget.inactiveColor : widget.activeColor),
child: Padding(
padding:
EdgeInsets.only(top: 6.0, bottom: 6.0, right: 6.0, left: 6.0),
padding: EdgeInsets.only(top: 4.0, bottom: 4.0, right: 6.0, left: 6.0),
child: Row(
children: <Widget>[
Container(width: _circleAnimation.value),
Container(
width: 16.0,
height: 16.0,
decoration: BoxDecoration(boxShadow: [
BoxShadow(
color: Colors.grey[800].withOpacity(0.15),
offset: Offset(0, 4.0),
blurRadius: 5.0)
], shape: BoxShape.circle, color: Colors.white),
decoration: BoxDecoration(boxShadow: [BoxShadow(color: Colors.grey[800].withOpacity(0.15), offset: Offset(0, 4.0), blurRadius: 5.0)], shape: BoxShape.circle, color: Colors.white),
)
],
),

@ -83,7 +83,6 @@ class _PhoneNumberSelectorWidgetState extends State<PhoneNumberSelectorWidget> {
_labelText,
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.44,
@ -96,7 +95,6 @@ class _PhoneNumberSelectorWidgetState extends State<PhoneNumberSelectorWidget> {
onChanged: (value) => widget.onNumberChange(value),
style: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff2B353E),
@ -107,7 +105,6 @@ class _PhoneNumberSelectorWidgetState extends State<PhoneNumberSelectorWidget> {
hintText: _hintText,
hintStyle: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff575757),
@ -120,7 +117,6 @@ class _PhoneNumberSelectorWidgetState extends State<PhoneNumberSelectorWidget> {
prefix,
style: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w500,
color: Color(0xff2E303A),
@ -189,12 +185,12 @@ class _MobileNo extends State<MobileNo> {
Widget build(BuildContext context) {
projectProvider = Provider.of(context);
return Visibility(
child: Column(children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: Container(
child: Column(children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: Container(
margin: EdgeInsets.only(bottom: 10.0),
height: 60.0,
decoration: BoxDecoration(
@ -207,70 +203,75 @@ class _MobileNo extends State<MobileNo> {
),
width: MediaQuery.of(context).size.width * 0.89,
child: Padding(
padding: EdgeInsets.all(10),
child: DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: _selectedType,
iconSize: 40,
elevation: 16,
onChanged: (value) => {
widget.onCountryChange(value),
setState(() {
countryCode = value;
_selectedType = value;
})
},
items: counties.map<DropdownMenuItem<String>>((Countries value) {
return DropdownMenuItem<String>(
value: value.code,
child: Text(projectProvider.isArabic == true ? value.nameAr : value.name),
);
}).toList())))),
),
],
),
Container(
padding: EdgeInsets.all(5),
decoration: BoxDecoration(color: Colors.white, border: Border.all(color: Colors.grey), borderRadius: BorderRadius.circular(10)),
child: Row(children: <Widget>[
Expanded(
padding: EdgeInsets.all(10),
child: DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: _selectedType,
iconSize: 40,
elevation: 16,
onChanged: (value) => {
widget.onCountryChange(value),
setState(() {
countryCode = value;
_selectedType = value;
})
},
items: counties.map<DropdownMenuItem<String>>((Countries value) {
return DropdownMenuItem<String>(
value: value.code,
child: Text(projectProvider.isArabic == true ? value.nameAr : value.name),
);
}).toList()),
),
),
),
),
],
),
Container(
padding: EdgeInsets.all(5),
decoration: BoxDecoration(color: Colors.white, border: Border.all(color: Colors.grey), borderRadius: BorderRadius.circular(10)),
child: Row(children: <Widget>[
Expanded(
flex: 1,
child: Icon(
Icons.phone,
color: secondaryColor,
)),
Expanded(
),
),
Expanded(
flex: 1,
child: Text(
countryCode,
overflow: TextOverflow.clip,
)),
Expanded(
flex: 4,
child: Container(
margin: widget.margin != null ? EdgeInsets.all(widget.margin) : EdgeInsets.only(top: widget.marginTop, right: widget.marginRight, bottom: widget.marginBottom, left: widget.marginLeft),
child: TextField(
controller: widget.controller,
keyboardType: TextInputType.number,
maxLength: 10,
inputFormatters: <TextInputFormatter>
[
FilteringTextInputFormatter.allow(RegExp("[0-9]")),
],
// maxLengthEnforced: true,
// onChanged: (value) {
// widget.controller.text = countryCode;
// },
onChanged: (value) => widget.onNumberChange(value),
decoration: InputDecoration(counterText: "", border: InputBorder.none, hintText: '5xxxxxxxx'),
),
),
)
]),
)
]));
Expanded(
flex: 4,
child: Container(
margin: widget.margin != null ? EdgeInsets.all(widget.margin) : EdgeInsets.only(top: widget.marginTop, right: widget.marginRight, bottom: widget.marginBottom, left: widget.marginLeft),
child: TextField(
controller: widget.controller,
keyboardType: TextInputType.number,
maxLength: 10,
inputFormatters: <TextInputFormatter>[
FilteringTextInputFormatter.allow(RegExp("[0-9]")),
],
// maxLengthEnforced: true,
// onChanged: (value) {
// widget.controller.text = countryCode;
// },
onChanged: (value) => widget.onNumberChange(value),
decoration: InputDecoration(counterText: "", border: InputBorder.none, hintText: '5xxxxxxxx'),
),
),
)
]),
)
]),
);
}
}

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -8,6 +9,7 @@ import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.d
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart';
class DoctorHeader extends StatelessWidget {
@ -30,10 +32,12 @@ class DoctorHeader extends StatelessWidget {
this.onRatingAndReviewTap})
: super(key: key);
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
String _speciality = (headerModel?.speciality ?? []).length > 0 ? headerModel.speciality.first : "";
projectViewModel = Provider.of(context);
return Container(
color: Colors.white,
child: Column(
@ -62,8 +66,8 @@ class DoctorHeader extends StatelessWidget {
_speciality,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
),
headerModel.invoiceNo.isNotEmpty ? myRichText(TranslationBase.of(context).invoiceNo + ":", headerModel.invoiceNo) : Container(),
myRichText(TranslationBase.of(context).branch, headerModel.projectName),
headerModel.invoiceNo.isNotEmpty ? myRichText(TranslationBase.of(context).invoiceNo + ":", headerModel.invoiceNo, projectViewModel.isArabic) : Container(),
myRichText(TranslationBase.of(context).branch, headerModel.projectName, projectViewModel.isArabic),
],
),
),
@ -73,7 +77,7 @@ class DoctorHeader extends StatelessWidget {
children: [
if (headerModel.date != null)
Text(
DateUtil.formatDateToDate(headerModel.date),
DateUtil.formatDateToDate(headerModel.date, projectViewModel.isArabic),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
if (headerModel.time != null)
@ -84,7 +88,7 @@ class DoctorHeader extends StatelessWidget {
if (headerModel?.nationalityFlagURL != null)
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Image.network(headerModel.nationalityFlagURL ?? "", height: 16),
child: Image.network(headerModel.nationalityFlagURL ?? "", height: 20),
),
],
)
@ -139,7 +143,7 @@ class DoctorHeader extends StatelessWidget {
},
child: Container(
padding: EdgeInsets.only(top: 10, bottom: 10, right: 21, left: 15),
decoration: BoxDecoration(color: Color(0XFFD02127), borderRadius: BorderRadius.only(topLeft: Radius.circular(10))),
decoration: BoxDecoration(color: Color(0XFFD02127), borderRadius: projectViewModel.isArabic ? BorderRadius.only(topRight: Radius.circular(10)) : BorderRadius.only(topLeft: Radius.circular(10))),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
@ -147,7 +151,7 @@ class DoctorHeader extends StatelessWidget {
SizedBox(width: 6),
Text(
buttonTitle == null ? TranslationBase.of(context).sendEmail : buttonTitle,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.64, height: 25 / 16),
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.64, height: 1),
),
],
),

@ -279,6 +279,7 @@ class AppBarWidget extends StatefulWidget with PreferredSizeWidget {
}
String _badgeText = "0";
class AppBarWidgetState extends State<AppBarWidget> {
String badgeText = "0";
@override
@ -397,42 +398,42 @@ class _RobotIcon extends State<RobotIcon> {
return Positioned(
child: Column(
children: [
isAnimation
? Container(
height: 150,
width: 200,
padding: EdgeInsets.all(5),
margin: EdgeInsets.only(right: 35.0, bottom: 0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.white,
boxShadow: [
BoxShadow(color: Colors.black, spreadRadius: 1),
],
),
child: TyperAnimatedTextKit(
text: Provider.of<ProjectViewModel>(context, listen: false).isArabic == true
? "هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي."
: "Through this service, you will be able to link your family medical files to your medical file so that you can manage their records by login to your medical file.",
textLength: Provider.of<ProjectViewModel>(context, listen: false).isArabic == true
? "هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي.".length
: "Through this service, you will be able to link your family medical files to your medical file so that you can manage their records by login to your medical file."
.length))
: Container(),
// isAnimation
// ? Container(
// height: 150,
// width: 200,
// padding: EdgeInsets.all(5),
// margin: EdgeInsets.only(right: 35.0, bottom: 0),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(10),
// color: Colors.white,
// boxShadow: [
// BoxShadow(color: Colors.black, spreadRadius: 1),
// ],
// ),
// child: TyperAnimatedTextKit(
// text: Provider.of<ProjectViewModel>(context, listen: false).isArabic == true
// ? "هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي."
// : "Through this service, you will be able to link your family medical files to your medical file so that you can manage their records by login to your medical file.",
// textLength: Provider.of<ProjectViewModel>(context, listen: false).isArabic == true
// ? "هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي.".length
// : "Through this service, you will be able to link your family medical files to your medical file so that you can manage their records by login to your medical file."
// .length))
// : Container(),
Stack(
children: [
isAnimation
? Positioned(
top: 0,
right: 40,
child: Container(
height: 0,
width: 0,
decoration: ShapeDecoration(
color: Colors.grey,
shape: MessageBorder(reverse: true),
)))
: Container(),
// isAnimation
// ? Positioned(
// top: 0,
// right: 40,
// child: Container(
// height: 0,
// width: 0,
// decoration: ShapeDecoration(
// color: Colors.grey,
// shape: MessageBorder(reverse: true),
// )))
// : Container(),
FloatingSearchButton()
],
)

@ -78,7 +78,7 @@ class FloatingSearchButton extends StatefulWidget {
class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProviderStateMixin {
Offset position = Offset(250, 400);
bool activeAnimation = false;
bool isShow = true;
bool isShow = false;
SearchProvider searchProvider = new SearchProvider();
RobotProvider eventProvider = RobotProvider();
bool isLoading = false;
@ -115,18 +115,16 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
offset = Tween<Offset>(begin: Offset(0.0, 1.0), end: Offset(0.0, 0.0)).animate(controller);
if (IS_VOICE_COMMAND_CLOSED == true) {
controller.reverse(from: -1);
}
if (mounted) {
//Future.delayed(const Duration(seconds: 2), () {
isArabic = Provider.of<ProjectViewModel>(context, listen: false).isArabic;
requestPermissions();
getUserData();
initialSpeak();
setState(() {
if (IS_TEXT_COMPLETED) {
isAnimationEnable = false;
}
});
} else {
if (mounted) {
//Future.delayed(const Duration(seconds: 2), () {
setState(() {
if (IS_TEXT_COMPLETED) {
isAnimationEnable = false;
}
});
}
}
event.controller.stream.listen((p) {
@ -190,7 +188,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
placeholder: (context, url) => Image.asset('assets/images/gif/robot-idle.gif'),
errorWidget: (context, url, error) => Icon(Icons.error),
)
: Image.asset(isAnimationEnable == true ? 'assets/images/gif/robot-speaking.gif' : 'assets/images/gif/robot-idle.gif'),
: Image.asset('assets/images/gif/robot-idle.gif'),
),
onTap: () {
new RoboSearch(context: context).showAlertDialog(context);
@ -273,7 +271,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
// });
}
void requestPermissions() async {
requestPermissions() async {
if (await Permission.microphone.isDenied || await Permission.microphone.isUndetermined) {
Map<Permission, PermissionStatus> statuses = await [
Permission.microphone,
@ -282,7 +280,6 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
}
Future<void> initSpeechState() async {
bool hasSpeech = await speech.initialize(onError: errorListener, onStatus: statusListener);
//if (hasSpeech) {
// _currentLocaleId =
// _currentLocaleId == 'en'
@ -290,6 +287,13 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
// : 'ar-SA'; // systemLocale.localeId;
// }
isArabic = Provider.of<ProjectViewModel>(context, listen: false).isArabic;
await requestPermissions();
getUserData();
await speech.initialize(onError: errorListener, onStatus: statusListener);
//initialSpeak();
if (!mounted) return;
// setState(() {

@ -1,9 +1,13 @@
import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/pages/login/login-type.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart' as auth;
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -30,6 +34,7 @@ class NotAutPage extends StatefulWidget {
}
class _NotAutPageState extends State<NotAutPage> {
final authService = new auth.AuthProvider();
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
@ -64,7 +69,7 @@ class _NotAutPageState extends State<NotAutPage> {
style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 23 / 24),
),
Text(
widget.description??"",
widget.description ?? "",
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56, height: 21 / 14),
),
SizedBox(
@ -329,9 +334,23 @@ class _NotAutPageState extends State<NotAutPage> {
if (data != null) {
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
GifLoaderDialogUtils.showMyDialog(context);
authService.selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES value) {
GifLoaderDialogUtils.hideDialog(context);
if (value != null) {
sharedPref.setObject(IMEI_USER_DATA, value);
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
});
}
}
}

Loading…
Cancel
Save