Merge branch 'development_new_design_2.0' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into sultan_new_design

merge-update-with-lab-changes
Sultan Khan 4 years ago
commit d514f64870

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="37.982" height="37.982" viewBox="0 0 37.982 37.982">
<path id="Path_4586" data-name="Path 4586" d="M18.991,0A18.991,18.991,0,1,0,37.982,18.991,19.013,19.013,0,0,0,18.991,0ZM9.5,17.8A3.555,3.555,0,0,1,11.2,14.777L8.75,12.793a1.187,1.187,0,1,1,1.491-1.847l5.052,4.088A3.561,3.561,0,1,1,9.5,17.8Zm16.29,12.688a1.188,1.188,0,0,1-1.678.04,7.42,7.42,0,0,0-10.234,0,1.187,1.187,0,1,1-1.636-1.721,9.787,9.787,0,0,1,13.5,0A1.187,1.187,0,0,1,25.785,30.492Zm3.447-17.7-2.455,1.985a3.549,3.549,0,1,1-4.09.256l5.054-4.088a1.187,1.187,0,1,1,1.491,1.847Z" fill="#ca3332"/>
</svg>

After

Width:  |  Height:  |  Size: 614 B

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="37.982" height="37.982" viewBox="0 0 37.982 37.982">
<path id="Path_4587" data-name="Path 4587" d="M18.991,0A18.991,18.991,0,1,0,37.982,18.991,19.013,19.013,0,0,0,18.991,0ZM9.5,14.243a2.374,2.374,0,1,1,2.374,2.374A2.378,2.378,0,0,1,9.5,14.243ZM27.383,28.895a1.192,1.192,0,0,1-1.681,0,9.72,9.72,0,0,0-13.429,0,1.187,1.187,0,0,1-1.678-1.678,11.869,11.869,0,0,1,16.788,0A1.188,1.188,0,0,1,27.383,28.895Zm-1.27-12.278a2.374,2.374,0,1,1,2.374-2.374A2.378,2.378,0,0,1,26.113,16.617Z" fill="#d56e6d"/>
</svg>

After

Width:  |  Height:  |  Size: 551 B

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="37.982" height="37.982" viewBox="0 0 37.982 37.982">
<path id="Path_4588" data-name="Path 4588" d="M18.991,0A18.991,18.991,0,1,0,37.982,18.991,19.013,19.013,0,0,0,18.991,0ZM9.5,14.243a2.374,2.374,0,1,1,2.374,2.374A2.378,2.378,0,0,1,9.5,14.243Zm15.43,14.243H13.056a1.187,1.187,0,1,1,0-2.374H24.926a1.187,1.187,0,1,1,0,2.374Zm1.187-11.869a2.374,2.374,0,1,1,2.374-2.374A2.378,2.378,0,0,1,26.113,16.617Z" fill="#ca8432"/>
</svg>

After

Width:  |  Height:  |  Size: 474 B

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="37.981" height="37.982" viewBox="0 0 37.981 37.982">
<path id="Path_4589" data-name="Path 4589" d="M18.991,0A18.991,18.991,0,1,0,37.981,18.991,19.013,19.013,0,0,0,18.991,0ZM8.308,14.243A3.561,3.561,0,1,1,11.869,17.8,3.565,3.565,0,0,1,8.308,14.243ZM27.382,27.382a11.866,11.866,0,0,1-16.785,0A1.187,1.187,0,0,1,12.275,25.7a9.72,9.72,0,0,0,13.429,0,1.187,1.187,0,0,1,1.678,1.678ZM26.112,17.8a3.561,3.561,0,1,1,3.561-3.561A3.565,3.565,0,0,1,26.112,17.8Z" fill="#8ca742"/>
</svg>

After

Width:  |  Height:  |  Size: 524 B

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="37.982" height="37.982" viewBox="0 0 37.982 37.982">
<path id="Path_4590" data-name="Path 4590" d="M18.991,0A18.991,18.991,0,1,0,37.982,18.991,19.013,19.013,0,0,0,18.991,0Zm7.122,11.869a2.374,2.374,0,1,1-2.374,2.374A2.378,2.378,0,0,1,26.113,11.869Zm-14.243,0A2.374,2.374,0,1,1,9.5,14.243,2.378,2.378,0,0,1,11.869,11.869Zm7.122,21.365a14.275,14.275,0,0,1-13.7-10.36,1.188,1.188,0,0,1,1.142-1.51H31.549a1.183,1.183,0,0,1,.945.47,1.2,1.2,0,0,1,.2,1.04A14.275,14.275,0,0,1,18.991,33.234Z" fill="#20a16a"/>
</svg>

After

Width:  |  Height:  |  Size: 558 B

@ -61,6 +61,9 @@ const Map localizedValues = {
'neverWait': {'en': 'Never wait in queue', 'ar': 'لا تنتظر في قائمة الانتظار'}, 'neverWait': {'en': 'Never wait in queue', 'ar': 'لا تنتظر في قائمة الانتظار'},
'reminderTitle': {'en': 'You have appointment with Dr. ', 'ar': 'لديك موعد مع د'}, 'reminderTitle': {'en': 'You have appointment with Dr. ', 'ar': 'لديك موعد مع د'},
'appointmentCalendar': {'en': 'Would you like to set a reminder for this appointment in your calendar?', 'ar': 'هل ترغب في تعيين تذكير لهذا الموعد في التقويم الخاص بك؟'}, 'appointmentCalendar': {'en': 'Would you like to set a reminder for this appointment in your calendar?', 'ar': 'هل ترغب في تعيين تذكير لهذا الموعد في التقويم الخاص بك؟'},
'appointmentReminder': {'en': 'Would you like to set a reminder for this appointment?', 'ar': 'هل ترغب في تعيين تذكير لهذا الموعد؟'},
'prescriptionReminder': {'en': 'Would you like to set a reminder for this prescription?', 'ar': 'هل ترغب في تعيين تذكير لهذه الوصفة؟'},
'please_select_from_below_options': {'en': 'Please select from below options:', 'ar': 'الرجاء التحديد من الخيارات أدناه:'},
'appointmentSuccess': {'en': 'Appointment is successfully booked', 'ar': 'تم حجز الموعد بنجاح'}, 'appointmentSuccess': {'en': 'Appointment is successfully booked', 'ar': 'تم حجز الموعد بنجاح'},
'docQualifications': {'en': 'Doctor Qualifications', 'ar': 'مؤهلات الطبيب'}, 'docQualifications': {'en': 'Doctor Qualifications', 'ar': 'مؤهلات الطبيب'},
'pressAgain': {'en': 'Press again to exit the app', 'ar': 'اضغط مرة أخرى للخروج من التطبيق'}, 'pressAgain': {'en': 'Press again to exit the app', 'ar': 'اضغط مرة أخرى للخروج من التطبيق'},
@ -916,7 +919,8 @@ const Map localizedValues = {
"iAcceptTermsConditions": {"en": "I Accept the Terms And Conditions", "ar": "أوافق على الشروط والأحكام"}, "iAcceptTermsConditions": {"en": "I Accept the Terms And Conditions", "ar": "أوافق على الشروط والأحكام"},
"YouCanPayByTheFollowingOptions": {"en": "You can pay by the following Options:", "ar": "يمكنك الدفع عن طريق الخيارات التالية:"}, "YouCanPayByTheFollowingOptions": {"en": "You can pay by the following Options:", "ar": "يمكنك الدفع عن طريق الخيارات التالية:"},
"RRTDDetails": { "RRTDDetails": {
"en": "The RRT service provides medical service for urgent and stable cases, not life-threatening situations or extremities, and the service includes providing medical care from a complete medical team at home.", "en":
"The RRT service provides medical service for urgent and stable cases, not life-threatening situations or extremities, and the service includes providing medical care from a complete medical team at home.",
"ar": "توفر خدمة فريق الاستجابة السريع RRT خدمه طبيه للحالات المستعجله والمستقره وليست الحالات المهدده للحياه او الاطراف ، وتشمل الخدمه تقديم رعايه طبيه من فريق طبي متكامل بالمنزل." "ar": "توفر خدمة فريق الاستجابة السريع RRT خدمه طبيه للحالات المستعجله والمستقره وليست الحالات المهدده للحياه او الاطراف ، وتشمل الخدمه تقديم رعايه طبيه من فريق طبي متكامل بالمنزل."
}, },
"rrtService": {"en": "RRT Service", "ar": "خدمة RRT"}, "rrtService": {"en": "RRT Service", "ar": "خدمة RRT"},
@ -1119,7 +1123,7 @@ const Map localizedValues = {
"en": "\nThis service Displays nearest branch\n among all the branches of All Habib \n medical Group based on your current Location", "en": "\nThis service Displays nearest branch\n among all the branches of All Habib \n medical Group based on your current Location",
"ar": "\nتعرض هذه الخدمة أقرب فرع\n من بين جميع فروع مجموعة \nالحبيب الطبية بناءً على موقعك الحالي." "ar": "\nتعرض هذه الخدمة أقرب فرع\n من بين جميع فروع مجموعة \nالحبيب الطبية بناءً على موقعك الحالي."
}, },
"NearestEr": {"en": "Nearest ER", "ar":"اقرب طوارئ"}, "NearestEr": {"en": "Nearest ER", "ar": "اقرب طوارئ"},
"infoCMC": { "infoCMC": {
"en": "Through this service, you can request a set of tests that help you and your doctor to understand the current health condition and then identify potential risks.", "en": "Through this service, you can request a set of tests that help you and your doctor to understand the current health condition and then identify potential risks.",
"ar": "من خلال هذه الخدمة يمكنك طلب مجموعة من الفحوصات التي تساعدك وتساعد طبيبك في فهم حالتك الصحية الحالية ومن ثم تحديد المخاطر المحتملة" "ar": "من خلال هذه الخدمة يمكنك طلب مجموعة من الفحوصات التي تساعدك وتساعد طبيبك في فهم حالتك الصحية الحالية ومن ثم تحديد المخاطر المحتملة"
@ -1508,22 +1512,24 @@ const Map localizedValues = {
"secondTri": {"en": "Second Trimester Ends (27 weeks):", "ar": "تاريخ انتهاء الثلث الثاني 27 اسبوع: "}, "secondTri": {"en": "Second Trimester Ends (27 weeks):", "ar": "تاريخ انتهاء الثلث الثاني 27 اسبوع: "},
"thirdTri": {"en": "Third Trimester, Estimated Due Date (40 weeks):", "ar": "تاريخ احتمال الولادة 40 اسبوع:"}, "thirdTri": {"en": "Third Trimester, Estimated Due Date (40 weeks):", "ar": "تاريخ احتمال الولادة 40 اسبوع:"},
"seeDoctorsList": {"en": "See List Of Doctors", "ar": "اعرض قائمة الأطباء"}, "seeDoctorsList": {"en": "See List Of Doctors", "ar": "اعرض قائمة الأطباء"},
"covidQuestionnaire": { "en": "Please answer below questionnaire:", "ar": "الرجاء الإجابة على الاستبيان أدناه:" }, "covidQuestionnaire": {"en": "Please answer below questionnaire:", "ar": "الرجاء الإجابة على الاستبيان أدناه:"},
"covidBookAppo": { "en": "Booking Appointment For: ", "ar": "موعد الحجز لـ: " }, "covidBookAppo": {"en": "Booking Appointment For: ", "ar": "موعد الحجز لـ: "},
"emptySchedule": { "en": "Doctor has no schedule.", "ar": "لا يوجد جدول حضور مسجل للطبيب" }, "emptySchedule": {"en": "Doctor has no schedule.", "ar": "لا يوجد جدول حضور مسجل للطبيب"},
"serviceNotAvailable": { "en": "Dear, this service is not available now, please try again later", "ar": "عزيزي المراجع, هذه الخدمة غير متوفرة الان يرجى المحاوله لاحقا"}, "serviceNotAvailable": {"en": "Dear, this service is not available now, please try again later", "ar": "عزيزي المراجع, هذه الخدمة غير متوفرة الان يرجى المحاوله لاحقا"},
"doctorScheduleNot": {"en": "Doctor schedule not available", "ar": "جدول الطبيب غير متوفر"}, "doctorScheduleNot": {"en": "Doctor schedule not available", "ar": "جدول الطبيب غير متوفر"},
"RRTRequestSuccess": { "en": "Request has been sent successfully, You will be contacted soon.", "ar": "تم إرسال الطلب بنجاح ، وسيتم الاتصال بك باسرع وقت ممكن" }, "RRTRequestSuccess": {"en": "Request has been sent successfully, You will be contacted soon.", "ar": "تم إرسال الطلب بنجاح ، وسيتم الاتصال بك باسرع وقت ممكن"},
"rateDoctorAppo": { "en": "Rate DR & Appointment", "ar": "معدل الدكتور والتعيين" }, "rateDoctorAppo": {"en": "Rate DR & Appointment", "ar": "معدل الدكتور والتعيين"},
"invoice": { "en": "Invoice", "ar": "الفاتورة" }, "invoice": {"en": "Invoice", "ar": "الفاتورة"},
"requestedDate": { "en": "Reqeusted Date", "ar": "التاريخ " }, "requestedDate": {"en": "Requested Date", "ar": "التاريخ "},
"callDuration": { "en": "Call Duration", "ar": "مدة الاتصال" }, "callDuration": {"en": "Call Duration", "ar": "مدة الاتصال"},
"alreadyRated": { "en": "This appointment has been previously evaluated.", "ar": "تم تقييم هذا الموعد مسبقاً" }, "alreadyRated": {"en": "This appointment has been previously evaluated.", "ar": "تم تقييم هذا الموعد مسبقاً"},
"insuranceCompany": { "en": "Insurance Company", "ar": "شركة تأمين" }, "insuranceCompany": {"en": "Insurance Company", "ar": "شركة تأمين"},
"preferredBranch": {"en": "Preferred Branch", "ar": "الفرع المفضل"}, "preferredBranch": {"en": "Preferred Branch", "ar": "الفرع المفضل"},
"selectPreferredBranch": {"en": "Select Preferred Branch", "ar": "اختر الفرع المفضل"}, "selectPreferredBranch": {"en": "Select Preferred Branch", "ar": "اختر الفرع المفضل"},
"patientLocated": {"en": "Where the patient located", "ar": "اين موقع المريض"}, "patientLocated": {"en": "Where the patient located", "ar": "اين موقع المريض"},
"otherInfo": {"en": "Other details", "ar": "تفاصيل أخرى"}, "otherInfo": {"en": "Other details", "ar": "تفاصيل أخرى"},
"medicalReport": {"en": "Medical Report", "ar": "تقرير طبي"}, "medicalReport": {"en": "Medical Report", "ar": "تقرير طبي"},
"insuredPatient": {"en": "Insured Patient", "ar": "هل لدى المريض تامين؟"}, "insuredPatient": {"en": "Insured Patient", "ar": "هل لدى المريض تامين؟"},
"rateDoctor": {"en": "Rate Doctor", "ar": "تقييم الطبيب"},
"rateAppointment": {"en": "Rate Appointment", "ar": "سعر التعيين"},
}; };

@ -16,9 +16,6 @@ class VaccineService extends BaseService {
body['To'] = "0"; body['To'] = "0";
body['From'] = "0"; body['From'] = "0";
// body['PatientID'] = 1018977;
// body['TokenID'] = "@dm!n";
hasError = false; hasError = false;
_vaccineList.clear(); _vaccineList.clear();
await baseAppClient.post(GET_VACCINES, await baseAppClient.post(GET_VACCINES,

@ -31,6 +31,11 @@ class PrescriptionsViewModel extends BaseViewModel {
List<PharmacyPrescriptions> get pharmacyPrescriptionsList => _prescriptionsService.pharmacyPrescriptionsList; List<PharmacyPrescriptions> get pharmacyPrescriptionsList => _prescriptionsService.pharmacyPrescriptionsList;
List<PrescriptionsList> get prescriptionsOrderList => filterType == FilterType.Clinic ? _prescriptionsOrderListClinic : _prescriptionsOrderListHospital; List<PrescriptionsList> get prescriptionsOrderList => filterType == FilterType.Clinic ? _prescriptionsOrderListClinic : _prescriptionsOrderListHospital;
List<PrescriptionsList> prescriptionsOrderListByValue(filterValue) {
return filterValue == FilterType.Clinic ? _prescriptionsOrderListClinic : _prescriptionsOrderListHospital;
}
get isMedDeliveryAllowed => _prescriptionsService.isMedDeliveryAllowed; get isMedDeliveryAllowed => _prescriptionsService.isMedDeliveryAllowed;
getPrescriptions() async { getPrescriptions() async {
setState(ViewState.Busy); setState(ViewState.Busy);

@ -1,5 +1,6 @@
class HeaderModel { class HeaderModel {
String doctorName; String doctorName;
int doctorId;
String doctorImageURL; String doctorImageURL;
List<String> speciality; List<String> speciality;
String invoiceNo; String invoiceNo;
@ -12,6 +13,6 @@ class HeaderModel {
int totalReviews; int totalReviews;
String email; String email;
HeaderModel(this.doctorName, this.doctorImageURL, this.speciality, this.invoiceNo, this.projectName, this.date, this.time, this.nationalityFlagURL, this.doctorRate, this.actualDoctorRate, HeaderModel(this.doctorName, this.doctorId, this.doctorImageURL, this.speciality, this.invoiceNo, this.projectName, this.date, this.time, this.nationalityFlagURL, this.doctorRate,
this.totalReviews, this.email); this.actualDoctorRate, this.totalReviews, this.email);
} }

@ -10,13 +10,12 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/dialogs/select_country_ingo_Dialog.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/dialogs/select_country_ingo_Dialog.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/dialogs/select_relation_type_dialog.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/dialogs/select_relation_type_dialog.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_confirm_sms_dialog.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart'; import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart'; import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart';
@ -28,13 +27,10 @@ class NewEReferralStepOnePage extends StatefulWidget {
final CreateEReferralRequestModel createEReferralRequestModel; final CreateEReferralRequestModel createEReferralRequestModel;
final Function changePageViewIndex; final Function changePageViewIndex;
const NewEReferralStepOnePage( const NewEReferralStepOnePage({Key key, this.createEReferralRequestModel, this.changePageViewIndex}) : super(key: key);
{Key key, this.createEReferralRequestModel, this.changePageViewIndex})
: super(key: key);
@override @override
_NewEReferralStepOnePageState createState() => _NewEReferralStepOnePageState createState() => _NewEReferralStepOnePageState();
_NewEReferralStepOnePageState();
} }
class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> { class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> {
@ -49,14 +45,7 @@ class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> {
// todo create a model for Country // todo create a model for Country
// todo use country from the json // todo use country from the json
dynamic _selectedCountry = { dynamic _selectedCountry = {"name": "Saudi Arabia", "name_ar": "المملكة العربية السعودية", "code": "966", "countryCode": "SA", "pattern": "5xxxxxxxx", "maxLength": 9};
"name": "Saudi Arabia",
"name_ar": "المملكة العربية السعودية",
"code": "966",
"countryCode": "SA",
"pattern": "5xxxxxxxx",
"maxLength": 9
};
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser; AuthenticatedUser authUser;
@ -120,16 +109,14 @@ class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> {
), ),
Center( Center(
child: Texts( child: Texts(
TranslationBase.of(context) TranslationBase.of(context).referralRequesterInformation,
.referralRequesterInformation,
), ),
), ),
SizedBox( SizedBox(
height: 12, height: 12,
), ),
NewTextFields( NewTextFields(
hintText: TranslationBase.of(context) hintText: TranslationBase.of(context).enterReferralRequesterName,
.enterReferralRequesterName,
controller: _nameTextController, controller: _nameTextController,
), ),
SizedBox( SizedBox(
@ -141,15 +128,10 @@ class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> {
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [Texts(getCountryName()), Icon(Icons.arrow_drop_down)],
Texts(getCountryName()),
Icon(Icons.arrow_drop_down)
],
), ),
), ),
), ),
@ -158,9 +140,7 @@ class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> {
), ),
MobileNumberTextFiled( MobileNumberTextFiled(
controller: _mobileTextController, controller: _mobileTextController,
code: _selectedCountry == null code: _selectedCountry == null ? "11" : _selectedCountry["code"],
? "11"
: _selectedCountry["code"],
), ),
SizedBox( SizedBox(
height: 12, height: 12,
@ -175,21 +155,15 @@ class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> {
height: 12, height: 12,
), ),
InkWell( InkWell(
onTap: () => confirmSelectRelationTypeDialog( onTap: () => confirmSelectRelationTypeDialog(model.relationTypes),
model.relationTypes),
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [Texts(getRelationName()), Icon(Icons.arrow_drop_down)],
Texts(getRelationName()),
Icon(Icons.arrow_drop_down)
],
), ),
), ),
), ),
@ -204,22 +178,19 @@ class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> {
padding: EdgeInsets.all(9), padding: EdgeInsets.all(9),
child: DefaultButton( child: DefaultButton(
TranslationBase.of(context).next, TranslationBase.of(context).next,
(_nameTextController.text.isEmpty || (_nameTextController.text.isEmpty || _selectedRelation == null || _mobileTextController.text.isEmpty)
_selectedRelation == null ||
_mobileTextController.text.isEmpty)
? null ? null
: () async { : () async {
SendActivationCodeForEReferralRequestModel Future.delayed(new Duration(milliseconds: 300)).then((value) async {
sendActivationCodeForEReferralRequestModel = GifLoaderDialogUtils.showMyDialog(context);
SendActivationCodeForEReferralRequestModel( SendActivationCodeForEReferralRequestModel sendActivationCodeForEReferralRequestModel = SendActivationCodeForEReferralRequestModel(
zipCode: _selectedCountry['code'], zipCode: _selectedCountry['code'],
patientMobileNumber: patientMobileNumber: int.parse(_mobileTextController.text),
int.parse(_mobileTextController.text), );
); await model.sendActivationCodeForEReferral(sendActivationCodeForEReferralRequestModel);
await model.sendActivationCodeForEReferral( GifLoaderDialogUtils.hideDialog(context);
sendActivationCodeForEReferralRequestModel); showSMSDialog(model);
});
showSMSDialog(model);
}, },
disabledColor: Colors.grey, disabledColor: Colors.grey,
), ),
@ -228,30 +199,24 @@ class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> {
void submit(EReferralViewModel model, code) async { void submit(EReferralViewModel model, code) async {
final activationCode = code; final activationCode = code;
// ToDo call service Future.delayed(new Duration(milliseconds: 300)).then((value) async {
CheckActivationCodeForEReferralResponseModel GifLoaderDialogUtils.showMyDialog(context);
checkActivationCodeForEReferralRequestModel = CheckActivationCodeForEReferralResponseModel checkActivationCodeForEReferralRequestModel = new CheckActivationCodeForEReferralResponseModel(activationCode: activationCode);
new CheckActivationCodeForEReferralResponseModel( await model.checkActivationCodeForEReferral(checkActivationCodeForEReferralRequestModel);
activationCode: activationCode); if (model.state == ViewState.ErrorLocal) {
await model.checkActivationCodeForEReferral( GifLoaderDialogUtils.hideDialog(context);
checkActivationCodeForEReferralRequestModel); } else {
if (model.state == ViewState.ErrorLocal) { GifLoaderDialogUtils.hideDialog(context);
// Utils.showErrorToast(model.error); Navigator.of(context).pop();
} else { widget.changePageViewIndex(1);
Navigator.of(context).pop(); widget.createEReferralRequestModel.requesterName = _nameTextController.text;
widget.changePageViewIndex(1); widget.createEReferralRequestModel.requesterContactNo = _selectedCountry['code'].toString().substring(1) + _mobileTextController.text;
widget.createEReferralRequestModel.requesterName = widget.createEReferralRequestModel.requesterRelationship = _selectedRelation.iD;
_nameTextController.text; }
widget.createEReferralRequestModel.requesterContactNo = });
_selectedCountry['code'].toString().substring(1) +
_mobileTextController.text;
widget.createEReferralRequestModel.requesterRelationship =
_selectedRelation.iD;
}
} }
void confirmSelectRelationTypeDialog( void confirmSelectRelationTypeDialog(List<GetAllRelationshipTypeResponseModel> relations) {
List<GetAllRelationshipTypeResponseModel> relations) {
showDialog( showDialog(
context: context, context: context,
child: SelectRelationTypeDialog( child: SelectRelationTypeDialog(
@ -302,9 +267,7 @@ class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> {
} }
class MobileNumberTextFiled extends StatelessWidget { class MobileNumberTextFiled extends StatelessWidget {
const MobileNumberTextFiled( const MobileNumberTextFiled({Key key, this.controller, this.code, this.onChange}) : super(key: key);
{Key key, this.controller, this.code, this.onChange})
: super(key: key);
final TextEditingController controller; final TextEditingController controller;
final String code; final String code;
@ -314,8 +277,7 @@ class MobileNumberTextFiled extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(15), color: Colors.white),
borderRadius: BorderRadius.circular(15), color: Colors.white),
child: Row(textDirection: TextDirection.ltr, children: <Widget>[ child: Row(textDirection: TextDirection.ltr, children: <Widget>[
Expanded( Expanded(
flex: 1, flex: 1,
@ -337,8 +299,7 @@ class MobileNumberTextFiled extends StatelessWidget {
controller: controller, controller: controller,
onChanged: onChange, onChanged: onChange,
keyboardType: TextInputType.phone, keyboardType: TextInputType.phone,
decoration: InputDecoration( decoration: InputDecoration(border: InputBorder.none, hintText: '5xxxxxxxx'),
border: InputBorder.none, hintText: '5xxxxxxxx'),
), ),
), ),
) )

@ -11,12 +11,12 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart'; import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -29,13 +29,10 @@ class NewEReferralStepThreePage extends StatefulWidget {
final CreateEReferralRequestModel createEReferralRequestModel; final CreateEReferralRequestModel createEReferralRequestModel;
final Function changePageViewIndex; final Function changePageViewIndex;
const NewEReferralStepThreePage( const NewEReferralStepThreePage({Key key, this.createEReferralRequestModel, this.changePageViewIndex}) : super(key: key);
{Key key, this.createEReferralRequestModel, this.changePageViewIndex})
: super(key: key);
@override @override
_NewEReferralStepThreePageState createState() => _NewEReferralStepThreePageState createState() => _NewEReferralStepThreePageState();
_NewEReferralStepThreePageState();
} }
class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> { class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
@ -104,8 +101,7 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(horizontal: 9),
horizontal: 9),
child: Texts( child: Texts(
TranslationBase.of(context).medicalReport, TranslationBase.of(context).medicalReport,
color: Colors.grey, color: Colors.grey,
@ -120,21 +116,14 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
context, context,
(String image, File file) { (String image, File file) {
setState(() { setState(() {
EReferralAttachment EReferralAttachment eReferralAttachment = new EReferralAttachment(fileName: 'image ${medicalReportImages.length + 1}.png', base64String: image);
eReferralAttachment = medicalReportImages.add(eReferralAttachment);
new EReferralAttachment(
fileName:
'image ${medicalReportImages.length + 1}.png',
base64String: image);
medicalReportImages
.add(eReferralAttachment);
}); });
}, },
); );
}, },
child: Container( child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(left: 10, right: 10, top: 15),
left: 10, right: 10, top: 15),
height: 50, height: 50,
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all(color: Colors.grey), border: Border.all(color: Colors.grey),
@ -144,10 +133,8 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
), ),
child: Center( child: Center(
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.center,
CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Icon(Icons.attach_file), Icon(Icons.attach_file),
Texts( Texts(
@ -169,30 +156,24 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
margin: EdgeInsets.all(10), margin: EdgeInsets.all(10),
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Row( Row(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Icon( Icon(FontAwesomeIcons.paperclip),
FontAwesomeIcons.paperclip),
SizedBox( SizedBox(
width: 8, width: 8,
), ),
Texts( Texts(
medicalReportImages[index] medicalReportImages[index].fileName,
.fileName,
), ),
], ],
), ),
InkWell( InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
medicalReportImages.remove( medicalReportImages.remove(medicalReportImages[index]);
medicalReportImages[
index]);
}); });
}, },
child: Icon( child: Icon(
@ -210,27 +191,22 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
), ),
Container( Container(
padding: EdgeInsets.only(top: 10), padding: EdgeInsets.only(top: 10),
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column( child: Column(
children: [ children: [
Container( Container(
width: double.infinity, width: double.infinity,
decoration: containerRadius(Colors.white, 12), decoration: containerRadius(Colors.white, 12),
margin: EdgeInsets.only(left: 20, right: 20), margin: EdgeInsets.only(left: 20, right: 20),
padding: EdgeInsets.only( padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12),
left: 10, right: 10, top: 12, bottom: 12),
child: Row( child: Row(
children: [ children: [
Flexible( Flexible(
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: [ children: [
Text( Text(
TranslationBase.of(context) TranslationBase.of(context).preferredBranch,
.preferredBranch,
style: TextStyle( style: TextStyle(
fontSize: 11, fontSize: 11,
letterSpacing: -0.44, letterSpacing: -0.44,
@ -239,38 +215,24 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
), ),
Container( Container(
height: 18, height: 18,
child: child: DropdownButtonHideUnderline(
DropdownButtonHideUnderline(
child: DropdownButton<String>( child: DropdownButton<String>(
key: projectDropdownKey, key: projectDropdownKey,
hint: Text(TranslationBase.of( hint: Text(TranslationBase.of(context).selectPreferredBranch),
context)
.selectPreferredBranch),
value: projectDropdownValue, value: projectDropdownValue,
iconSize: 0, iconSize: 0,
isExpanded: true, isExpanded: true,
style: TextStyle( style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black),
fontSize: 14, items: projectsList.map((item) {
letterSpacing: -0.56, return new DropdownMenuItem<String>(
color: Colors.black), value: item.mainProjectID.toString() + "," + item.name.toString(),
items: child: new Text(item.name),
projectsList.map((item) {
return new DropdownMenuItem<
String>(
value: item.mainProjectID
.toString() +
"," +
item.name.toString(),
child:
new Text(item.name),
); );
}).toList(), }).toList(),
onChanged: (newValue) { onChanged: (newValue) {
setState(() { setState(() {
projectDropdownValue = projectDropdownValue = newValue;
newValue; print(projectDropdownValue);
print(
projectDropdownValue);
}); });
}, },
), ),
@ -289,9 +251,7 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
height: 12, height: 12,
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column( child: Column(
children: [ children: [
Row( Row(
@ -337,25 +297,16 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
children: [ children: [
InkWell( InkWell(
onTap: () { onTap: () {
ImageOptions.showImageOptions(context, ImageOptions.showImageOptions(context, (String image, File file) {
(String image, File file) {
setState(() { setState(() {
EReferralAttachment EReferralAttachment eReferralAttachment = new EReferralAttachment(fileName: 'image ${medicalReportImages.length + 1}.png', base64String: image);
eReferralAttachment =
new EReferralAttachment(
fileName:
'image ${medicalReportImages.length + 1}.png',
base64String: image);
insuredPatientImages = [ insuredPatientImages = [eReferralAttachment];
eReferralAttachment
];
}); });
}); });
}, },
child: Container( child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(left: 10, right: 10, top: 15),
left: 10, right: 10, top: 15),
height: 50, height: 50,
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all(color: Colors.grey), border: Border.all(color: Colors.grey),
@ -365,10 +316,8 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
), ),
child: Center( child: Center(
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.center,
CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Icon(Icons.attach_file), Icon(Icons.attach_file),
Texts( Texts(
@ -390,15 +339,12 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
margin: EdgeInsets.all(10), margin: EdgeInsets.all(10),
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(8.0),
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceBetween,
MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Row( Row(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Icon(FontAwesomeIcons Icon(FontAwesomeIcons.paperclip),
.paperclip),
SizedBox( SizedBox(
width: 8, width: 8,
), ),
@ -410,9 +356,7 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
InkWell( InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
insuredPatientImages.remove( insuredPatientImages.remove(insuredPatientImages[index]);
insuredPatientImages[
index]);
}); });
}, },
child: Icon( child: Icon(
@ -444,44 +388,24 @@ class _NewEReferralStepThreePageState extends State<NewEReferralStepThreePage> {
medicalReportImages.length == 0 medicalReportImages.length == 0
? null ? null
: () async { : () async {
this Future.delayed(new Duration(milliseconds: 300)).then((value) async {
.widget GifLoaderDialogUtils.showMyDialog(context);
.createEReferralRequestModel this.widget.createEReferralRequestModel.medicalReportAttachment = medicalReportImages;
.medicalReportAttachment = medicalReportImages; this.widget.createEReferralRequestModel.insuranceCardAttachment = insuredPatientImages.length != 0 ? insuredPatientImages[0] : null;
this this.widget.createEReferralRequestModel.isInsuredPatient = isPatientInsured;
.widget // ToDo make the preferred Branch info dynamic
.createEReferralRequestModel this.widget.createEReferralRequestModel.preferredBranchCode = num.tryParse(projectDropdownValue.split(",")[0]);
.insuranceCardAttachment = this.widget.createEReferralRequestModel.preferredBranchName = projectDropdownValue.split(",")[1];
insuredPatientImages.length != 0 this.widget.createEReferralRequestModel.otherRelationship = "";
? insuredPatientImages[0] await model.createEReferral(this.widget.createEReferralRequestModel);
: null; if (model.state == ViewState.ErrorLocal) {
this GifLoaderDialogUtils.hideDialog(context);
.widget Utils.showErrorToast(model.error);
.createEReferralRequestModel } else {
.isInsuredPatient = isPatientInsured; GifLoaderDialogUtils.hideDialog(context);
// ToDo make the preferred Branch info dynamic AppToast.showSuccessToast(message: "Referral sent successfully");
this }
.widget });
.createEReferralRequestModel
.preferredBranchCode =
num.tryParse(projectDropdownValue.split(",")[0]);
this
.widget
.createEReferralRequestModel
.preferredBranchName =
projectDropdownValue.split(",")[1];
this
.widget
.createEReferralRequestModel
.otherRelationship = "";
await model.createEReferral(
this.widget.createEReferralRequestModel);
if (model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error);
} else {
AppToast.showSuccessToast(
message: "Referral sent successfully");
}
}, },
disabledColor: Colors.grey, disabledColor: Colors.grey,
color: Color(0xff359846), color: Color(0xff359846),

@ -57,25 +57,29 @@ class _SearchForReferralsPageState extends State<SearchForReferralsPage> {
return BaseView<EReferralViewModel>( return BaseView<EReferralViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
if (projectViewModel.isLogin) { if (projectViewModel.isLogin) {
SearchEReferralRequestModel searchEReferralRequestModel = Future.delayed(new Duration(milliseconds: 300)).then((value) async {
new SearchEReferralRequestModel( GifLoaderDialogUtils.showMyDialog(context);
patientMobileNumber: (projectViewModel.user.outSA == 0 SearchEReferralRequestModel searchEReferralRequestModel =
? "966" new SearchEReferralRequestModel(
: "971") + patientMobileNumber: (projectViewModel.user.outSA == 0
projectViewModel.user.mobileNumber ? "966"
.substring(1, projectViewModel.user.mobileNumber.length), : "971") +
); projectViewModel.user.mobileNumber
if (selectedCriteria.value == 1) { .substring(1, projectViewModel.user.mobileNumber.length),
searchEReferralRequestModel.identificationNo = );
_searchTextController.text; if (selectedCriteria.value == 1) {
searchEReferralRequestModel.referralNumber = 0; searchEReferralRequestModel.identificationNo =
} else { _searchTextController.text;
searchEReferralRequestModel.referralNumber = searchEReferralRequestModel.referralNumber = 0;
int.parse(_searchTextController.text); } else {
searchEReferralRequestModel.identificationNo = searchEReferralRequestModel.referralNumber =
projectViewModel.user.patientIdentificationNo; int.parse(_searchTextController.text);
} searchEReferralRequestModel.identificationNo =
await model.getEReferrals(searchEReferralRequestModel); projectViewModel.user.patientIdentificationNo;
}
await model.getEReferrals(searchEReferralRequestModel);
GifLoaderDialogUtils.hideDialog(context);
});
} }
}, },
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(

@ -74,6 +74,7 @@ class _BookConfirmState extends State<BookConfirm> {
DoctorHeader( DoctorHeader(
headerModel: HeaderModel( headerModel: HeaderModel(
widget.doctor.name, widget.doctor.name,
widget.doctor.doctorID,
widget.doctor.doctorImageURL, widget.doctor.doctorImageURL,
widget.doctor.speciality, widget.doctor.speciality,
"", "",
@ -307,7 +308,7 @@ class _BookConfirmState extends State<BookConfirm> {
AppoitmentAllHistoryResultList appo; AppoitmentAllHistoryResultList appo;
widget.service.insertLiveCareScheduleAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, docObject.serviceID, widget.selectedTime, widget.selectedDate, context).then((res) { widget.service.insertLiveCareScheduleAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, docObject.serviceID, widget.selectedTime, widget.selectedDate, context).then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Appointment Booked Successfully"); AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
print(res['AppointmentNo']); print(res['AppointmentNo']);
Future.delayed(new Duration(milliseconds: 500), () { Future.delayed(new Duration(milliseconds: 500), () {

@ -60,6 +60,7 @@ class _BookSuccessState extends State<BookSuccess> {
DoctorHeader( DoctorHeader(
headerModel: HeaderModel( headerModel: HeaderModel(
widget.docObject.name, widget.docObject.name,
widget.docObject.doctorID,
widget.docObject.doctorImageURL, widget.docObject.doctorImageURL,
widget.docObject.speciality, widget.docObject.speciality,
"", "",

@ -103,6 +103,7 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
DoctorHeader( DoctorHeader(
headerModel: HeaderModel( headerModel: HeaderModel(
widget.doctor.name, widget.doctor.name,
widget.doctor.doctorID,
widget.doctor.doctorImageURL, widget.doctor.doctorImageURL,
widget.doctor.speciality, widget.doctor.speciality,
"", "",

@ -70,6 +70,7 @@ class _BookReminderPageState extends State<BookReminderPage> {
DoctorHeader( DoctorHeader(
headerModel: HeaderModel( headerModel: HeaderModel(
widget.docObject.name, widget.docObject.name,
widget.docObject.doctorID,
widget.docObject.doctorImageURL, widget.docObject.doctorImageURL,
widget.docObject.speciality, widget.docObject.speciality,
"", "",
@ -191,7 +192,7 @@ class _BookReminderPageState extends State<BookReminderPage> {
disabledTextColor: Colors.white, disabledTextColor: Colors.white,
disabledColor: CustomColors.green, disabledColor: CustomColors.green,
onPressed: () async { onPressed: () async {
print(widget.patientShareResponse.appointmentNo); print(widget.patientShareResponse.appointmentNo);
showReminderDialog( showReminderDialog(
context, context,
widget.dateTime, widget.dateTime,
@ -201,7 +202,7 @@ class _BookReminderPageState extends State<BookReminderPage> {
widget.appoTimeFormatted, widget.appoTimeFormatted,
onSuccess: () { onSuccess: () {
AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess); AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess);
navigateToBookSuccess(context); navigateToBookSuccess(context);
}, },
); );
}, },

@ -99,7 +99,11 @@ class DoctorView extends StatelessWidget {
filledIcon: Icons.star, filledIcon: Icons.star,
emptyIcon: Icons.star_border, emptyIcon: Icons.star_border,
), ),
if (isShowFlag) Image.network(this.doctor.nationalityFlagURL, width: 22.0, height: 22.0) Icon(
Icons.arrow_forward,
color: Theme.of(context).primaryColor,
),
// if (isShowFlag) Image.network(this.doctor.nationalityFlagURL, width: 22.0, height: 22.0)
], ],
), ),
], ],

@ -115,7 +115,7 @@ class _ReminderDialogState extends State<ReminderDialog> {
), ),
mHeight(20), mHeight(20),
Text( Text(
"When would you like to set a reminder for this appointment?", TranslationBase.of(context).appointmentReminder,
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
color: Color(0xff2B353E), color: Color(0xff2B353E),
@ -125,7 +125,7 @@ class _ReminderDialogState extends State<ReminderDialog> {
), ),
mHeight(20), mHeight(20),
Text( Text(
"Please select from below options:", TranslationBase.of(context).pleaseSelectFromBelowOptions,
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
color: Color(0xff2B353E), color: Color(0xff2B353E),
@ -135,7 +135,7 @@ class _ReminderDialogState extends State<ReminderDialog> {
), ),
ListTile( ListTile(
contentPadding: EdgeInsets.zero, contentPadding: EdgeInsets.zero,
title: const Text('Before 30 Mins'), title: Text(TranslationBase.of(context).appoReminder30),
leading: Radio<int>( leading: Radio<int>(
value: 0, value: 0,
groupValue: i, groupValue: i,
@ -148,7 +148,7 @@ class _ReminderDialogState extends State<ReminderDialog> {
), ),
ListTile( ListTile(
contentPadding: EdgeInsets.zero, contentPadding: EdgeInsets.zero,
title: const Text('Before 1 Hour'), title: Text(TranslationBase.of(context).appoReminder60),
leading: Radio<int>( leading: Radio<int>(
value: 1, value: 1,
groupValue: i, groupValue: i,
@ -161,7 +161,7 @@ class _ReminderDialogState extends State<ReminderDialog> {
), ),
ListTile( ListTile(
contentPadding: EdgeInsets.zero, contentPadding: EdgeInsets.zero,
title: const Text('Before 1 Hour and 30 Mins'), title: Text(TranslationBase.of(context).appoReminder90),
leading: Radio<int>( leading: Radio<int>(
value: 2, value: 2,
groupValue: i, groupValue: i,
@ -174,7 +174,7 @@ class _ReminderDialogState extends State<ReminderDialog> {
), ),
ListTile( ListTile(
contentPadding: EdgeInsets.zero, contentPadding: EdgeInsets.zero,
title: const Text('Before 2 Hours'), title: Text(TranslationBase.of(context).appoReminder120),
leading: Radio<int>( leading: Radio<int>(
value: 3, value: 3,
groupValue: i, groupValue: i,

@ -451,7 +451,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots> with TickerProviderStat
.insertAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, CovidTimeSlots.selectedTime, CovidTimeSlots.selectedDate, context, widget.selectedProcedure.procedureID) .insertAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, CovidTimeSlots.selectedTime, CovidTimeSlots.selectedDate, context, widget.selectedProcedure.procedureID)
.then((res) { .then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Appointment Booked Successfully"); AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
getToDoCount(); getToDoCount();
getPatientShare(context, res['AppointmentNo'], docObject.clinicID, docObject.projectID, docObject); getPatientShare(context, res['AppointmentNo'], docObject.clinicID, docObject.projectID, docObject);
} else { } else {

@ -75,13 +75,14 @@ class _ErOptionsState extends State<ErOptions> {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push(context, FadePage(page: DdServicesPage())); // Navigator.push(context, FadePage(page: DdServicesPage()));
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: "ED", title: "ED",
imagePath: 'assets/images/new-design/AM.PNG', imagePath: 'assets/images/new-design/AM.PNG',
subTitle: TranslationBase.of(context).service, subTitle: TranslationBase.of(context).service,
isPngImage: true, isPngImage: true,
isEnable: false,
), ),
), ),
InkWell( InkWell(

@ -94,6 +94,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
DoctorHeader( DoctorHeader(
headerModel: HeaderModel( headerModel: HeaderModel(
widget.appo.doctorTitle + " " + widget.appo.doctorNameObj, widget.appo.doctorTitle + " " + widget.appo.doctorNameObj,
widget.appo.doctorID,
widget.appo.doctorImageURL, widget.appo.doctorImageURL,
widget.appo.doctorSpeciality, widget.appo.doctorSpeciality,
"", "",
@ -107,7 +108,8 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
"", "",
//model.user.emailAddress, //model.user.emailAddress,
), ),
isNeedToShowButton: (widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment) ? false : true, isNeedToShowButton:
(widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment) ? false : true,
buttonTitle: TranslationBase.of(context).schedule, buttonTitle: TranslationBase.of(context).schedule,
buttonIcon: 'assets/images/new/Boo_ Appointment.svg', buttonIcon: 'assets/images/new/Boo_ Appointment.svg',
showConfirmMessageDialog: false, showConfirmMessageDialog: false,
@ -357,13 +359,15 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
width: 100.0, width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).excellent, style: TextStyle(fontSize: 13.0, color: Colors.black))), child: Text(TranslationBase.of(context).excellent, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container( Expanded(
margin: EdgeInsets.only(top: 10.0), child: Container(
child: SizedBox( margin: EdgeInsets.only(top: 10.0),
width: getRatingWidth(doctorDetailsList[0].patientNumber), child: SizedBox(
height: 6.0, width: getRatingWidth(doctorDetailsList[0].patientNumber),
child: Container( height: 6.0,
color: Colors.green[700], child: Container(
color: Colors.green[700],
),
), ),
), ),
), ),

@ -162,13 +162,19 @@ class _SchedulePageState extends State<SchedulePage> {
weeks[index][index2]['WorkingHours'], weeks[index][index2]['WorkingHours'],
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
), ),
) ),
Icon(projectViewModel.isArabic
? Icons
.arrow_back_ios_outlined
: Icons
.arrow_forward_ios_outlined, size: 16.0),
], ],
) )
]))), ]))),
) ),
], ],
)))); )
)));
}, },
)), )),
PageViewIndicator( PageViewIndicator(

@ -41,10 +41,7 @@ class _EyeHomePageState extends State<EyeHomePage> with SingleTickerProviderStat
super.initState(); super.initState();
_tabController = TabController(length: 2, vsync: this); _tabController = TabController(length: 2, vsync: this);
_tabController.addListener(() { _tabController.addListener(() {
setState(() {});
setState(() {
});
}); });
} }
@ -61,7 +58,7 @@ class _EyeHomePageState extends State<EyeHomePage> with SingleTickerProviderStat
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
appBarTitle: widget.appointmentAllHistoryResultList.doctorTitle + " " + widget.appointmentAllHistoryResultList.doctorNameObj, appBarTitle: widget.appointmentAllHistoryResultList.doctorTitle + " " + widget.appointmentAllHistoryResultList.doctorNameObj,
showNewAppBarTitle: true, showNewAppBarTitle: true,
showNewAppBar: true, showNewAppBar: true,
backgroundColor: CustomColors.appBackgroudGreyColor, backgroundColor: CustomColors.appBackgroudGreyColor,
@ -70,6 +67,7 @@ class _EyeHomePageState extends State<EyeHomePage> with SingleTickerProviderStat
DoctorHeader( DoctorHeader(
headerModel: HeaderModel( headerModel: HeaderModel(
widget.appointmentAllHistoryResultList.doctorTitle + " " + widget.appointmentAllHistoryResultList.doctorNameObj, widget.appointmentAllHistoryResultList.doctorTitle + " " + widget.appointmentAllHistoryResultList.doctorNameObj,
widget.appointmentAllHistoryResultList.doctorID,
widget.appointmentAllHistoryResultList.doctorImageURL, widget.appointmentAllHistoryResultList.doctorImageURL,
widget.appointmentAllHistoryResultList.doctorSpeciality, widget.appointmentAllHistoryResultList.doctorSpeciality,
"", "",
@ -83,7 +81,7 @@ class _EyeHomePageState extends State<EyeHomePage> with SingleTickerProviderStat
"", "",
//model.user.emailAddress, //model.user.emailAddress,
), ),
isNeedToShowButton: _tabController.index==0?true:projectViewModel.havePrivilege(15), isNeedToShowButton: _tabController.index == 0 ? true : projectViewModel.havePrivilege(15),
showConfirmMessageDialog: true, showConfirmMessageDialog: true,
onRatingAndReviewTap: getDoctorRatingsDetails, onRatingAndReviewTap: getDoctorRatingsDetails,
onTap: () { onTap: () {

@ -27,8 +27,7 @@ class InvoiceDetail extends StatefulWidget {
final DentalInvoiceDetailResponse dentalInvoiceDetailResponse; final DentalInvoiceDetailResponse dentalInvoiceDetailResponse;
final BuildContext context; final BuildContext context;
InvoiceDetail(this.doctor, this.listDentalAppointments, InvoiceDetail(this.doctor, this.listDentalAppointments, this.dentalInvoiceDetailResponse, this.context);
this.dentalInvoiceDetailResponse, this.context);
@override @override
_InvoiceDetailState createState() => _InvoiceDetailState(); _InvoiceDetailState createState() => _InvoiceDetailState();
@ -50,11 +49,7 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
generateInvoiceDetails(); generateInvoiceDetails();
return AppScaffold( return AppScaffold(
appBarTitle: widget.doctor.doctorTitle != null appBarTitle: widget.doctor.doctorTitle != null ? widget.doctor.doctorTitle.toString() : TranslationBase.of(context).dr + " " + widget.doctor.name.toString(),
? widget.doctor.doctorTitle.toString()
: TranslationBase.of(context).dr +
" " +
widget.doctor.name.toString(),
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
showNewAppBar: true, showNewAppBar: true,
@ -67,6 +62,7 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
DoctorHeader( DoctorHeader(
headerModel: HeaderModel( headerModel: HeaderModel(
widget.doctor.name, widget.doctor.name,
widget.doctor.doctorID,
widget.doctor.doctorImageURL, widget.doctor.doctorImageURL,
widget.doctor.speciality, widget.doctor.speciality,
widget.doctor.clinicName, widget.doctor.clinicName,
@ -76,7 +72,7 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
widget.doctor.nationalityFlagURL, widget.doctor.nationalityFlagURL,
widget.doctor.doctorRate, widget.doctor.doctorRate,
widget.doctor.actualDoctorRate, widget.doctor.actualDoctorRate,
widget.doctor.noOfPatientsRate, widget.doctor.noOfPatientsRate ?? 0,
projectViewModel.user.emailAddress), projectViewModel.user.emailAddress),
onTap: () { onTap: () {
sendInvoiceEmail(); sendInvoiceEmail();
@ -86,8 +82,7 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
child: Card( child: Card(
elevation: 3.0, elevation: 3.0,
shape: cardRadius(12), shape: cardRadius(12),
margin: EdgeInsets.only( margin: EdgeInsets.only(left: 16, top: 8, right: 16, bottom: 16),
left: 16, top: 8, right: 16, bottom: 16),
child: Padding( child: Padding(
padding: const EdgeInsets.all(12.0), padding: const EdgeInsets.all(12.0),
child: Column( child: Column(
@ -112,8 +107,7 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
child: Card( child: Card(
elevation: 3.0, elevation: 3.0,
shape: cardRadius(12), shape: cardRadius(12),
margin: EdgeInsets.only( margin: EdgeInsets.only(left: 16, top: 8, right: 16, bottom: 16),
left: 16, top: 8, right: 16, bottom: 16),
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Column( child: Column(
@ -121,29 +115,12 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
children: [ children: [
Container( Container(
margin: EdgeInsets.only(bottom: 10.0), margin: EdgeInsets.only(bottom: 10.0),
child: Text(TranslationBase.of(context).cardDetail, child: Text(TranslationBase.of(context).cardDetail, style: TextStyle(color: Colors.black, letterSpacing: -0.64, fontSize: 18.0, fontWeight: FontWeight.bold)),
style: TextStyle(
color: Colors.black,
letterSpacing: -0.64,
fontSize: 18.0,
fontWeight: FontWeight.bold)),
), ),
myRichText( myRichText(TranslationBase.of(context).insuranceCompany + ": ", widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].companyName, projectViewModel.isArabic),
TranslationBase.of(context).insuranceCompany +
": ",
widget.dentalInvoiceDetailResponse
.listEInvoiceForDental[0].companyName,
projectViewModel.isArabic),
myRichText( myRichText(
TranslationBase.of(context).insuranceID + ": ", TranslationBase.of(context).insuranceID + ": ",
widget widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].insuranceID != null ? widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].insuranceID : "N/A",
.dentalInvoiceDetailResponse
.listEInvoiceForDental[0]
.insuranceID !=
null
? widget.dentalInvoiceDetailResponse
.listEInvoiceForDental[0].insuranceID
: "N/A",
projectViewModel.isArabic), projectViewModel.isArabic),
], ],
), ),
@ -155,8 +132,7 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
child: Card( child: Card(
elevation: 3.0, elevation: 3.0,
shape: cardRadius(12), shape: cardRadius(12),
margin: EdgeInsets.only( margin: EdgeInsets.only(left: 16, top: 8, right: 16, bottom: 16),
left: 16, top: 8, right: 16, bottom: 16),
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Column( child: Column(
@ -164,13 +140,7 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
children: [ children: [
Container( Container(
margin: EdgeInsets.only(bottom: 10.0), margin: EdgeInsets.only(bottom: 10.0),
child: Text( child: Text(TranslationBase.of(context).totalBalance, style: TextStyle(letterSpacing: -0.64, color: Colors.black, fontSize: 18.0, fontWeight: FontWeight.bold)),
TranslationBase.of(context).totalBalance,
style: TextStyle(
letterSpacing: -0.64,
color: Colors.black,
fontSize: 18.0,
fontWeight: FontWeight.bold)),
), ),
Container( Container(
width: double.infinity, width: double.infinity,
@ -178,15 +148,10 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
child: _getNormalText( child: _getNormalText(TranslationBase.of(context).discount),
TranslationBase.of(context).discount),
), ),
Expanded( Expanded(
child: _getNormalText( child: _getNormalText(this.totalDiscount.toString() + " " + TranslationBase.of(context).sar, isBold: true),
this.totalDiscount.toString() +
" " +
TranslationBase.of(context).sar,
isBold: true),
) )
], ],
), ),
@ -198,26 +163,13 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
child: _getNormalText( child: _getNormalText(TranslationBase.of(context).totalVAT.toString() +
TranslationBase.of(context) " (" +
.totalVAT widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].vATPercentage.toString() +
.toString() + "%): "),
" (" +
widget
.dentalInvoiceDetailResponse
.listEInvoiceForDental[0]
.listConsultation[0]
.vATPercentage
.toString() +
"%): "),
), ),
Expanded( Expanded(
child: _getNormalText( child: _getNormalText(num.tryParse(this.totalVAT.toString()).toStringAsFixed(2) + " " + TranslationBase.of(context).sar, isBold: true),
num.tryParse(this.totalVAT.toString())
.toStringAsFixed(2) +
" " +
TranslationBase.of(context).sar,
isBold: true),
) )
], ],
), ),
@ -229,15 +181,10 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
child: _getNormalText( child: _getNormalText(TranslationBase.of(context).total),
TranslationBase.of(context).total),
), ),
Expanded( Expanded(
child: _getNormalText( child: _getNormalText(this.subTotal.toString() + " " + TranslationBase.of(context).sar, isBold: true),
this.subTotal.toString() +
" " +
TranslationBase.of(context).sar,
isBold: true),
) )
], ],
), ),
@ -249,15 +196,10 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
child: _getNormalText( child: _getNormalText(TranslationBase.of(context).paid),
TranslationBase.of(context).paid),
), ),
Expanded( Expanded(
child: _getNormalText( child: _getNormalText(this.grandTotal.toString() + " " + TranslationBase.of(context).sar, isBold: true),
this.grandTotal.toString() +
" " +
TranslationBase.of(context).sar,
isBold: true),
) )
], ],
), ),
@ -284,10 +226,8 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
List<ListConsultation> listConsultations = new List(); List<ListConsultation> listConsultations = new List();
widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation.forEach((item) {
.forEach((item) { var i = listConsultations.indexWhere((x) => x.procedureID == item.procedureID);
var i = listConsultations
.indexWhere((x) => x.procedureID == item.procedureID);
if (i <= -1) { if (i <= -1) {
listConsultations.add(item); listConsultations.add(item);
} }
@ -308,16 +248,10 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
GifLoaderDialogUtils.showMyDialog(widget.context); GifLoaderDialogUtils.showMyDialog(widget.context);
MyInvoicesService myInvoicesService = new MyInvoicesService(); MyInvoicesService myInvoicesService = new MyInvoicesService();
myInvoicesService myInvoicesService.sendDentalAppointmentInvoiceEmail(widget.listDentalAppointments.projectID, widget.listDentalAppointments.appointmentNo, widget.context).then((res) {
.sendDentalAppointmentInvoiceEmail(
widget.listDentalAppointments.projectID,
widget.listDentalAppointments.appointmentNo,
widget.context)
.then((res) {
GifLoaderDialogUtils.hideDialog(widget.context); GifLoaderDialogUtils.hideDialog(widget.context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast( AppToast.showSuccessToast(message: TranslationBase.of(widget.context).emailSentSuccessfully);
message: TranslationBase.of(widget.context).emailSentSuccessfully);
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
@ -342,37 +276,17 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
], ],
), ),
); );
for (int i = 0; for (int i = 0; i < widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation.length; i++) {
i <
widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0]
.listConsultation.length;
i++) {
tableRow.add( tableRow.add(
TableRow(children: [ TableRow(children: [
Utils.tableColumnValue( Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[i].procedureName}',
'${widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[i].procedureName}', isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation.length - 1)),
isLast: i == Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[i].quantity}',
(widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0] isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation.length - 1)),
.listConsultation.length - Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[i].price.toString() + " " + TranslationBase.of(context).sar}',
1)), isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation.length - 1)),
Utils.tableColumnValue( Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[i].total.toString() + " " + TranslationBase.of(context).sar}',
'${widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[i].quantity}', isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation.length - 1)),
isLast: i ==
(widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0]
.listConsultation.length -
1)),
Utils.tableColumnValue(
'${widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[i].price.toString() + " " + TranslationBase.of(context).sar}',
isLast: i ==
(widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0]
.listConsultation.length -
1)),
Utils.tableColumnValue(
'${widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[i].total.toString() + " " + TranslationBase.of(context).sar}',
isLast: i ==
(widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0]
.listConsultation.length -
1)),
]), ]),
); );
} }

@ -38,6 +38,7 @@ class PrescriptionDetailsPage extends StatelessWidget {
DoctorHeader( DoctorHeader(
headerModel: HeaderModel( headerModel: HeaderModel(
prescriptions.doctorName, prescriptions.doctorName,
prescriptions.doctorID,
prescriptions.doctorImageURL, prescriptions.doctorImageURL,
prescriptions.speciality, prescriptions.speciality,
"", "",
@ -179,8 +180,8 @@ class PrescriptionDetailsPage extends StatelessWidget {
AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess); AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess);
}, },
); );
return; return;
showGeneralDialog( showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5), barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) { transitionBuilder: (context, a1, a2, widget) {

@ -49,6 +49,7 @@ class PrescriptionItemsPage extends StatelessWidget {
DoctorHeader( DoctorHeader(
headerModel: HeaderModel( headerModel: HeaderModel(
prescriptions.doctorName, prescriptions.doctorName,
prescriptions.doctorID,
prescriptions.doctorImageURL, prescriptions.doctorImageURL,
prescriptions.speciality, prescriptions.speciality,
"", "",

@ -1,5 +1,6 @@
import 'dart:ui'; import 'dart:ui';
import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
@ -26,7 +27,7 @@ class _HomePrescriptionsPageState extends State<HomePrescriptionsPage> with Sing
@override @override
void initState() { void initState() {
super.initState(); super.initState();
_tabController = TabController(length: 2, vsync: this); _tabController = TabController(length: 3, vsync: this);
imagesInfo.add(ImagesInfo( imagesInfo.add(ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/ar/0.png')); imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/ar/0.png'));
imagesInfo.add(ImagesInfo( imagesInfo.add(ImagesInfo(
@ -74,7 +75,8 @@ class _HomePrescriptionsPageState extends State<HomePrescriptionsPage> with Sing
letterSpacing: -0.48, letterSpacing: -0.48,
), ),
tabs: [ tabs: [
Text(TranslationBase.of(context).prescriptions, style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins')), Text(TranslationBase.of(context).byClinic, style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins')),
Text(TranslationBase.of(context).byHospital, style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins')),
Text(TranslationBase.of(context).orderLog, style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins')), Text(TranslationBase.of(context).orderLog, style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins')),
], ],
), ),
@ -84,9 +86,19 @@ class _HomePrescriptionsPageState extends State<HomePrescriptionsPage> with Sing
controller: _tabController, controller: _tabController,
children: <Widget>[ children: <Widget>[
PrescriptionsPage( PrescriptionsPage(
FilterType.Clinic,
prescriptionsViewModel: model, prescriptionsViewModel: model,
showOrderLog: () async { showOrderLog: () async {
_tabController.animateTo(1); _tabController.animateTo(2);
await model.getPrescriptionsOrders(showLoading: true);
setState(() {});
},
),
PrescriptionsPage(
FilterType.Hospital,
prescriptionsViewModel: model,
showOrderLog: () async {
_tabController.animateTo(2);
await model.getPrescriptionsOrders(showLoading: true); await model.getPrescriptionsOrders(showLoading: true);
setState(() {}); setState(() {});
}, },

@ -16,86 +16,66 @@ import 'package:provider/provider.dart';
class PrescriptionsPage extends StatelessWidget { class PrescriptionsPage extends StatelessWidget {
final VoidCallback showOrderLog; final VoidCallback showOrderLog;
final FilterType filterType;
final PrescriptionsViewModel prescriptionsViewModel; final PrescriptionsViewModel prescriptionsViewModel;
const PrescriptionsPage({Key key, this.prescriptionsViewModel, this.showOrderLog}) : super(key: key); const PrescriptionsPage(this.filterType, {Key key, this.prescriptionsViewModel, this.showOrderLog}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
baseViewModel: prescriptionsViewModel, baseViewModel: prescriptionsViewModel,
body: FractionallySizedBox( body: ListView.separated(
widthFactor: 1.0,
child: ListView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
children: <Widget>[ padding: EdgeInsets.only(top: 12),
Row( separatorBuilder: (context, index) {
children: [ return Container(
MyTabView(TranslationBase.of(context).byClinic, FilterType.Clinic, prescriptionsViewModel.filterType, () { height: 12,
prescriptionsViewModel.setFilterType(FilterType.Clinic); margin: EdgeInsets.only(left: 21, right: 21),
}), // color: Color(0xffD9D9D9),
MyTabView(TranslationBase.of(context).byHospital, FilterType.Hospital, prescriptionsViewModel.filterType, () { );
prescriptionsViewModel.setFilterType(FilterType.Hospital); },
}), itemBuilder: (context, index) {
], List<Prescriptions> prescriptionsList = prescriptionsViewModel.prescriptionsOrderListByValue(filterType)[index].prescriptionsList;
), return AppExpandableNotifier(
ListView.separated( title: prescriptionsViewModel.prescriptionsOrderListByValue(filterType)[index].filterName,
physics: NeverScrollableScrollPhysics(), bodyWidget: ListView.separated(
shrinkWrap: true, shrinkWrap: true,
padding: EdgeInsets.only(top: 12), physics: NeverScrollableScrollPhysics(),
separatorBuilder: (context, index) { padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
return Container( itemBuilder: (context, _index) {
height: 12, Prescriptions prescriptions = prescriptionsList[_index];
margin: EdgeInsets.only(left: 21, right: 21), return DoctorCard(
// color: Color(0xffD9D9D9), onTap: () async {
); final _shouldRecallApi = await Navigator.push(
}, context,
itemBuilder: (context, index) { FadePage(
List<Prescriptions> prescriptionsList = prescriptionsViewModel.prescriptionsOrderList[index].prescriptionsList; page: PrescriptionItemsPage(
return AppExpandableNotifier( prescriptions: prescriptions,
title: prescriptionsViewModel.prescriptionsOrderList[index].filterName, ),
bodyWidget: ListView.separated( ),
shrinkWrap: true, );
physics: NeverScrollableScrollPhysics(), if (_shouldRecallApi != null) {
padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21), showOrderLog();
itemBuilder: (context, _index) { }
Prescriptions prescriptions = prescriptionsList[_index]; },
return DoctorCard( name: prescriptions.doctorName,
onTap: () async { profileUrl: prescriptions.doctorImageURL,
final _shouldRecallApi = await Navigator.push( rating: prescriptions.actualDoctorRate.toDouble(),
context, subName: prescriptions.name,
FadePage( isInOutPatient: prescriptions.isInOutPatient,
page: PrescriptionItemsPage( isLiveCareAppointment: prescriptions.isLiveCareAppointment,
prescriptions: prescriptions, // appointmentTime: DateUtil.formatDateToTime(DateUtil.convertStringToDate(prescriptions
), // .appointmentDate)),
), date: DateUtil.convertStringToDate(prescriptions
); .appointmentDate) //projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr( DateUtil.convertStringToDate(prescriptions.appointmentDate) ):DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(prescriptions.appointmentDate)),
if (_shouldRecallApi != null) { );
showOrderLog(); },
} separatorBuilder: (context, index) => SizedBox(height: 14),
}, itemCount: prescriptionsList.length),
name: prescriptions.doctorName, );
profileUrl: prescriptions.doctorImageURL, },
rating: prescriptions.actualDoctorRate.toDouble(), itemCount: prescriptionsViewModel.prescriptionsOrderListByValue(filterType).length,
subName: prescriptions.name, ));
isInOutPatient: prescriptions.isInOutPatient,
isLiveCareAppointment: prescriptions.isLiveCareAppointment,
// appointmentTime: DateUtil.formatDateToTime(DateUtil.convertStringToDate(prescriptions
// .appointmentDate)),
date: DateUtil.convertStringToDate(prescriptions
.appointmentDate) //projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr( DateUtil.convertStringToDate(prescriptions.appointmentDate) ):DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(prescriptions.appointmentDate)),
);
},
separatorBuilder: (context, index) => SizedBox(height: 14),
itemCount: prescriptionsList.length),
);
},
itemCount: prescriptionsViewModel.prescriptionsOrderList.length,
)
],
),
),
);
} }
} }

@ -40,6 +40,7 @@ class RadiologyDetailsPage extends StatelessWidget {
DoctorHeader( DoctorHeader(
headerModel: new HeaderModel( headerModel: new HeaderModel(
finalRadiology.doctorName, finalRadiology.doctorName,
finalRadiology.doctorID,
finalRadiology.doctorImageURL, finalRadiology.doctorImageURL,
finalRadiology.speciality, finalRadiology.speciality,
finalRadiology.invoiceNo.toString(), finalRadiology.invoiceNo.toString(),

@ -1,27 +1,35 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/rate/appointment_details.dart'; import 'package:diplomaticquarterapp/core/model/rate/appointment_details.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart'; import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class RateAppointmentClinic extends StatefulWidget { class RateAppointmentClinic extends StatefulWidget {
final AppointmentDetails appointmentDetails; final AppointmentDetails appointmentDetails;
final String doctorNote; final String doctorNote;
final int doctorRate; final int doctorRate;
RateAppointmentClinic({this.appointmentDetails, this.doctorRate, this.doctorNote}); RateAppointmentClinic(
{this.appointmentDetails, this.doctorRate, this.doctorNote});
@override @override
_RateAppointmentClinicState createState() => _RateAppointmentClinicState(); _RateAppointmentClinicState createState() => _RateAppointmentClinicState();
@ -34,164 +42,253 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<AppointmentRateViewModel>( return BaseView<AppointmentRateViewModel>(
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
baseViewModel: model, baseViewModel: model,
body: Scaffold( appBarTitle: TranslationBase.of(context).rateAppointment,
backgroundColor: Colors.grey[200], body: SingleChildScrollView(
appBar: AppBar( child: Container(
elevation: 0, padding: EdgeInsets.all(12),
textTheme: TextTheme( child: Column(
headline6: TextStyle(color: Colors.white, fontWeight: FontWeight.bold), crossAxisAlignment: CrossAxisAlignment.start,
), children: <Widget>[
title: Text('Rate'), SizedBox(
leading: Builder( height: 25,
builder: (BuildContext context) { ),
return IconButton( Text(
icon: Icon(Icons.menu), TranslationBase.of(context).lastAppointment,
color: Colors.white, style: TextStyle(
onPressed: () => Scaffold.of(context).openDrawer(), fontSize: 16,
); fontWeight: FontWeight.w600,
}, color: Color(0xff2B353E),
), letterSpacing: -0.64,
centerTitle: true, height: 23 / 16),
), ),
drawer: SafeArea(child: AppDrawer()), SizedBox(
body: FractionallySizedBox( height: 25,
widthFactor: 1, ),
child: SingleChildScrollView( Card(
child: Container( elevation: 0,
padding: EdgeInsets.all(12), shape: cardRadius(10),
child: Column( child: Padding(
children: <Widget>[ padding: const EdgeInsets.only(
SizedBox( left: 12, right: 12, top: 12, bottom: 12),
height: 25, child: Column(
), mainAxisSize: MainAxisSize.min,
Texts( crossAxisAlignment: CrossAxisAlignment.start,
TranslationBase.of(context).lastAppointment, children: [
bold: true, Container(
color: Colors.black, margin: EdgeInsets.only(bottom: 10.0),
), child: Row(
SizedBox( mainAxisAlignment: MainAxisAlignment.spaceBetween,
height: 25, children: [
Text(
model.appointmentDetails.projectName,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
letterSpacing: -0.64,
height: 25 / 16),
),
Text(
model.appointmentDetails.startTime,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
letterSpacing: -0.64,
height: 25 / 16),
),
],
),
),
Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
LargeAvatar(
url:
'https://hmgwebservices.com/Images/Hospitals/' +
model.appointmentDetails.projectID
.toString() +
'.jpg',
width: 48,
height: 48,
),
SizedBox(width: 11),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
myRichText(
TranslationBase.of(context).clinic + ":",
model.appointmentDetails.projectName,
projectViewModel.isArabic),
myRichText(
TranslationBase.of(context).date + ":",
DateUtil.getMonthDayYearDateFormatted(
DateUtil.convertStringToDate(model
.appointmentDetails
.appointmentDate)),
projectViewModel.isArabic),
],
),
),
],
),
],
), ),
Container( ),
width: double.infinity, ),
decoration: BoxDecoration( SizedBox(
borderRadius: BorderRadius.circular(15), height: 12,
color: Colors.white, ),
shape: BoxShape.rectangle, Container(
border: Border.all(color: Colors.white, width: 0.5), width: double.infinity,
), child: Card(
elevation: 0,
shape: cardRadius(10),
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column( child: Column(
children: <Widget>[ crossAxisAlignment: CrossAxisAlignment.start,
SizedBox( children: [
height: 8, Text(
), TranslationBase.of(context).rateClinic,
LargeAvatar( style: TextStyle(
url: 'https://hmgwebservices.com/Images/Hospitals/' + model.appointmentDetails.projectID.toString() + '.jpg', fontSize: 16,
name: model.appointmentDetails.clinicName, fontWeight: FontWeight.w600,
width: 110, color: Color(0xff2B353E),
height: 110, letterSpacing: -0.64,
), height: 23 / 16),
SizedBox(
height: 22,
),
Texts(
model.appointmentDetails.projectName,
fontSize: 22,
fontWeight: FontWeight.bold,
), ),
SizedBox( SizedBox(
height: 4, height: 12,
), ),
Texts( Row(
DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(model.appointmentDetails.appointmentDate)), mainAxisAlignment: MainAxisAlignment.center,
), children: <Widget>[
SizedBox( ...List.generate(
height: 8, 5,
(index) => AnimatedSwitcher(
duration: Duration(milliseconds: 300),
switchInCurve: Curves.elasticOut,
switchOutCurve: Curves.elasticIn,
transitionBuilder: (Widget child,
Animation<double> animation) {
return ScaleTransition(
child: child, scale: animation);
},
child: rating == (index + 1)
? Container(
margin: EdgeInsets.only(
left: 3.0, right: 3.0),
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(100),
border: Border.all(
width: 3,
color: CustomColors.green)),
key: ValueKey<int>(rating),
child: IconButton(
onPressed: () {
setState(() {
rating = index + 1;
});
},
iconSize: 35,
icon: SvgPicture.asset(
'assets/images/new/appointment-rating/' +
(index + 1).toString() +
'.svg'),
),
)
: Container(
key: ValueKey<int>(rating),
child: IconButton(
onPressed: () {
setState(() {
rating = index + 1;
});
},
iconSize: 35,
icon: SvgPicture.asset(
'assets/images/new/appointment-rating/' +
(index + 1).toString() +
'.svg'),
),
),
),
)
],
), ),
Texts(model.appointmentDetails.startTime),
SizedBox(
height: 8,
)
], ],
), ),
), ),
SizedBox( ),
height: 12,
),
Center(
child: Texts(
TranslationBase.of(context).rateClinic,
textAlign: TextAlign.center,
)),
SizedBox(
height: 12,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
...List.generate(
5,
(index) => AnimatedSwitcher(
duration: Duration(milliseconds: 1000),
switchInCurve: Curves.elasticOut,
switchOutCurve: Curves.elasticIn,
transitionBuilder: (Widget child, Animation<double> animation) {
return ScaleTransition(child: child, scale: animation);
},
child: Container(
key: ValueKey<int>(rating),
child: IconButton(
//iconSize: 45.0,
onPressed: () {
setState(() {
rating = index + 1;
});
},
iconSize: rating == (index + 1) ? 60 : 40,
// Theme.of(context).hintColor,
icon: Image.asset('assets/images/' + (index + 1).toString() + '.png')),
),
),
)
],
),
SizedBox(height: 12),
SizedBox(
height: 12,
),
],
), ),
), SizedBox(height: 12),
SizedBox(
height: 12,
),
],
), ),
), ),
bottomSheet: Container( ),
height: MediaQuery.of(context).size.height * 0.15, bottomSheet: Container(
width: double.infinity, color: Colors.white,
color: Colors.grey[200], padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: Column( child: Row(
children: <Widget>[ mainAxisSize: MainAxisSize.min,
Container( children: [
width: MediaQuery.of(context).size.width * 0.9, Expanded(
child: SecondaryButton( child: DefaultButton(
onTap: () async { TranslationBase.of(context).later,
if (rating > 0) { () {
Navigator.pushReplacement(
context,
FadePage(
page: LandingPage(),
),
);
},
color: Color(0xffEAEAEA),
textColor: Color(0xff2B353E),
),
),
SizedBox(width: 10),
Expanded(
child: DefaultButton(
TranslationBase.of(context).submit,
rating <= 0
? null
: () {
model model
.sendAppointmentRate( .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( .then(
(value) => { (value) => {
model model
.sendDoctorRate( .sendDoctorRate(
widget.doctorRate, widget.doctorRate,
widget.appointmentDetails.appointmentNo, widget
.appointmentDetails.appointmentNo,
widget.appointmentDetails.projectID, widget.appointmentDetails.projectID,
widget.appointmentDetails.doctorID, widget.appointmentDetails.doctorID,
widget.appointmentDetails.clinicID, widget.appointmentDetails.clinicID,
note, note,
widget.appointmentDetails.appointmentDate, widget.appointmentDetails
.appointmentDate,
widget.appointmentDetails.doctorName, widget.appointmentDetails.doctorName,
widget.appointmentDetails.projectName, widget.appointmentDetails.projectName,
widget.appointmentDetails.clinicName) widget.appointmentDetails.clinicName)
@ -205,36 +302,12 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
}), }),
}, },
); );
} else { },
AppToast.showErrorToast(message: 'please rate the clinic'); color: Color(0xff359846),
} disabledColor: Colors.grey,
},
label: TranslationBase.of(context).submit,
disabled: (model.state == ViewState.Busy || rating == 0),
// loading: model.state == ViewState.BusyLocal,
textColor: Theme.of(context).backgroundColor),
), ),
SizedBox( ),
height: 12, ],
),
InkWell(
onTap: () {
Navigator.pushReplacement(
context,
FadePage(
page: LandingPage(),
),
);
},
child: Texts(
TranslationBase.of(context).later,
decoration: TextDecoration.underline,
color: HexColor('#151DFE'),
fontSize: 18,
),
)
],
),
), ),
), ),
), ),

@ -1,20 +1,17 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_clinic.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_clinic.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class RateAppointmentDoctor extends StatefulWidget { class RateAppointmentDoctor extends StatefulWidget {
@override @override
@ -30,214 +27,192 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<AppointmentRateViewModel>( return BaseView<AppointmentRateViewModel>(
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
baseViewModel: model, baseViewModel: model,
body: Scaffold( appBarTitle: TranslationBase.of(context).rateDoctor,
backgroundColor: Colors.grey[200], body: SingleChildScrollView(
appBar: AppBar( child: Container(
elevation: 0, padding: EdgeInsets.all(12),
textTheme: TextTheme( child: Column(
headline6: crossAxisAlignment: CrossAxisAlignment.start,
TextStyle(color: Colors.white, fontWeight: FontWeight.bold), children: <Widget>[
), SizedBox(
title: Text(TranslationBase.of(context).rate), height: 25, //5598
leading: Builder( ),
builder: (BuildContext context) { Text(
return IconButton( TranslationBase.of(context).lastVisit,
icon: Icon(Icons.menu), style: TextStyle(
color: Colors.white, fontSize: 16,
onPressed: () => Scaffold.of(context).openDrawer(), fontWeight: FontWeight.w600,
); color: Color(0xff2B353E),
}, letterSpacing: -0.64,
), height: 23 / 16),
centerTitle: true, ),
), SizedBox(
drawer: SafeArea(child: AppDrawer()), height: 25,
body: FractionallySizedBox( ),
widthFactor: 1, Container(
child: SingleChildScrollView( child: DoctorView(
child: Container( doctor: getDoctorObject(model),
padding: EdgeInsets.all(12), isLiveCareAppointment: false,
child: Column( isShowFlag: false,
children: <Widget>[ ),
SizedBox( ),
height: 25, //5598 SizedBox(
), height: 12,
Texts( ),
TranslationBase.of(context).lastVisit, Container(
bold: true, width: double.infinity,
color: Colors.black, child: Card(
), elevation: 0,
SizedBox( shape: cardRadius(10),
height: 25, child: Padding(
), padding: const EdgeInsets.all(12.0),
Container(
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,
shape: BoxShape.rectangle,
border: Border.all(color: Colors.white, width: 0.5),
),
child: Column( child: Column(
children: <Widget>[ crossAxisAlignment: CrossAxisAlignment.start,
SizedBox( children: [
height: 8, Text(
), TranslationBase.of(context).tapTitle,
LargeAvatar( style: TextStyle(
name: model.appointmentDetails.doctorName, fontSize: 16,
url: model.appointmentDetails.doctorImageURL, fontWeight: FontWeight.w600,
width: 110, color: Color(0xff2B353E),
height: 110, letterSpacing: -0.64,
), height: 23 / 16),
SizedBox(
height: 22,
),
Texts(
TranslationBase.of(context).dr + " " + model.appointmentDetails.doctorName,
bold: true,
), ),
SizedBox( SizedBox(
height: 4, height: 12,
), ),
Texts( Row(
model.appointmentDetails.clinicName != null ? model.appointmentDetails.clinicName : "", mainAxisAlignment: MainAxisAlignment.center,
bold: true, children: <Widget>[
...List.generate(
5,
(index) => AnimatedSwitcher(
duration: Duration(milliseconds: 1000),
switchInCurve: Curves.elasticOut,
switchOutCurve: Curves.elasticIn,
transitionBuilder: (Widget child,
Animation<double> animation) {
return ScaleTransition(
child: child, scale: animation);
},
child: Container(
key: ValueKey<int>(rating),
child: IconButton(
iconSize: 45.0,
onPressed: () {
setState(() {
rating = index + 1;
});
},
color: rating >= (index + 1)
? Color.fromRGBO(255, 186, 0, 1.0)
: Colors.grey[400],
// Theme.of(context).hintColor,
icon: Icon(rating >= (index + 1)
? Icons.star
: Icons.star)),
),
),
)
],
), ),
SizedBox(
height: 8,
)
], ],
), ),
), ),
SizedBox( ),
height: 12, ),
), SizedBox(
Center( height: 12,
child: Texts( ),
TranslationBase.of(context).tapTitle, Card(
textAlign: TextAlign.center, elevation: 0,
)), shape: cardRadius(10),
SizedBox( child: Padding(
height: 12, padding: EdgeInsets.all(8.0),
), child: TextField(
Row( maxLines: 5,
mainAxisAlignment: MainAxisAlignment.center, decoration: InputDecoration.collapsed(
children: <Widget>[ hintText: TranslationBase.of(context).notes,
...List.generate( hintStyle: TextStyle(
5, fontSize: 16,
(index) => AnimatedSwitcher( fontWeight: FontWeight.w600,
duration: Duration(milliseconds: 1000), color: Color(0xff2B353E),
switchInCurve: Curves.elasticOut, letterSpacing: -0.64,
switchOutCurve: Curves.elasticIn, height: 23 / 16)),
transitionBuilder: onChanged: (value) {
(Widget child, Animation<double> animation) { setState(() {
return ScaleTransition( note = value;
child: child, scale: animation); });
}, },
child: Container( ))),
key: ValueKey<int>(rating), ],
child: IconButton( ),
iconSize: 45.0, ),
onPressed: () { ),
setState(() { bottomSheet: Container(
rating = index + 1; color: Colors.white,
}); padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
}, child: Row(
color: rating >= (index + 1) mainAxisSize: MainAxisSize.min,
? Color.fromRGBO(255, 186, 0, 1.0) children: [
: Colors.grey[400], Expanded(
// Theme.of(context).hintColor, child: DefaultButton(
icon: Icon(rating >= (index + 1) TranslationBase.of(context).later,
? EvaIcons.star () {
: EvaIcons.star)), Navigator.pushReplacement(
), context,
), FadePage(
) page: LandingPage(),
],
),
SizedBox(
height: 12,
),
Form(
key: formKey,
child: TextFields(
hintText: TranslationBase.of(context).notes,
minLines: 4,
maxLines: 4,
// validator: (value) {
// if (value.isEmpty)
// return 'Please enter your note';
// else if (rating == 0) return 'Rating cannot be \"0\"';
// return null;
// },
onChanged: (value) {
setState(() {
note = value;
});
},
), ),
), );
SizedBox( },
height: 12, color: Color(0xffEAEAEA),
), textColor: Color(0xff2B353E),
Container( ),
width: double.infinity, ),
child: Column( SizedBox(width: 10),
children: <Widget>[ Expanded(
Container( child: DefaultButton(
width: MediaQuery.of(context).size.width * 0.9, TranslationBase.of(context).next,
child: SecondaryButton( rating <= 0
onTap: () async { ? null
final form = formKey.currentState; : () {
if (form.validate() && rating>0 ) { Navigator.push(
form.save(); context,
Navigator.push( FadePage(
context, page: RateAppointmentClinic(
FadePage( appointmentDetails: model.appointmentDetails,
page: RateAppointmentClinic( doctorNote: note,
appointmentDetails: doctorRate: rating,
model.appointmentDetails, ),
doctorNote: note,
doctorRate: rating,
),
),
);
}
},
label: TranslationBase.of(context).next,
disabled: (model.state == ViewState.BusyLocal || rating==0),
loading: model.state == ViewState.BusyLocal,
textColor: Theme.of(context).backgroundColor),
),
SizedBox(
height: 12,
),
InkWell(
onTap: () {
Navigator.pushReplacement(
context,
FadePage(
page: LandingPage(),
),
);
},
child: Texts(
TranslationBase.of(context).later,
decoration: TextDecoration.underline,
color: HexColor('#151DFE'),
fontSize: 18,
), ),
) );
], },
), // iconData: Icons.notifications_active,
) color: Color(0xff359846),
], disabledColor: Colors.grey,
), ),
), ),
), ],
), ),
), ),
), ),
); );
} }
DoctorList getDoctorObject(AppointmentRateViewModel model) {
DoctorList doctor = new DoctorList();
doctor.name = model.appointmentDetails.doctorName;
doctor.doctorImageURL = model.appointmentDetails.doctorImageURL;
doctor.clinicName = model.appointmentDetails.clinicName;
doctor.projectName = model.appointmentDetails.projectName;
doctor.actualDoctorRate = 5;
return doctor;
}
} }

@ -108,6 +108,11 @@ class TranslationBase {
String get appointmentCalendar => localizedValues['appointmentCalendar'][locale.languageCode]; String get appointmentCalendar => localizedValues['appointmentCalendar'][locale.languageCode];
String get appointmentReminder => localizedValues['appointmentReminder'][locale.languageCode];
String get prescriptionReminder => localizedValues['prescriptionReminder'][locale.languageCode];
String get pleaseSelectFromBelowOptions => localizedValues['please_select_from_below_options'][locale.languageCode];
String get appointmentSuccess => localizedValues['appointmentSuccess'][locale.languageCode]; String get appointmentSuccess => localizedValues['appointmentSuccess'][locale.languageCode];
String get confirm => localizedValues['confirm'][locale.languageCode]; String get confirm => localizedValues['confirm'][locale.languageCode];
@ -2322,6 +2327,9 @@ class TranslationBase {
String get insuredPatientReferral => localizedValues["insuredPatient"][locale.languageCode]; String get insuredPatientReferral => localizedValues["insuredPatient"][locale.languageCode];
String get rateDoctor => localizedValues["rateDoctor"][locale.languageCode];
String get rateAppointment => localizedValues["rateAppointment"][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -6,8 +6,7 @@ class GifLoaderContainer extends StatefulWidget {
_GifLoaderContainerState createState() => _GifLoaderContainerState(); _GifLoaderContainerState createState() => _GifLoaderContainerState();
} }
class _GifLoaderContainerState extends State<GifLoaderContainer> class _GifLoaderContainerState extends State<GifLoaderContainer> with TickerProviderStateMixin {
with TickerProviderStateMixin {
GifController controller1; GifController controller1;
@override @override
@ -15,8 +14,9 @@ class _GifLoaderContainerState extends State<GifLoaderContainer>
controller1 = GifController(vsync: this); controller1 = GifController(vsync: this);
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
controller1.repeat( try {
min: 0, max: 11, period: Duration(milliseconds: 750), reverse: true); controller1.repeat(min: 0, max: 11, period: Duration(milliseconds: 750), reverse: true);
} catch (ex) {}
}); });
super.initState(); super.initState();
} }
@ -30,14 +30,13 @@ class _GifLoaderContainerState extends State<GifLoaderContainer>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Center( return Center(
//progress-loading.gif //progress-loading.gif
child: Container( child: Container(
// margin: EdgeInsets.only(bottom: 40), // margin: EdgeInsets.only(bottom: 40),
child: GifImage( child: GifImage(
controller: controller1, controller: controller1,
image: AssetImage( image: AssetImage("assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"),
"assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"), ),
), ));
));
} }
} }

@ -44,6 +44,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
DoctorHeader( DoctorHeader(
headerModel: HeaderModel( headerModel: HeaderModel(
widget.patientLabOrder.doctorName, widget.patientLabOrder.doctorName,
widget.patientLabOrder.doctorID,
widget.patientLabOrder.doctorImageURL, widget.patientLabOrder.doctorImageURL,
widget.patientLabOrder.speciality, widget.patientLabOrder.speciality,
widget.billNo, widget.billNo,

@ -94,17 +94,19 @@ class DoctorCard extends StatelessWidget {
), ),
) )
: BoxDecoration(), : BoxDecoration(),
child: isShowInOutPatient ? RotatedBox( child: isShowInOutPatient
quarterTurns: 3, ? RotatedBox(
child: Text( quarterTurns: 3,
isLiveCareAppointment child: Text(
? TranslationBase.of(context).liveCare.toLowerCase().capitalizeFirstofEach isLiveCareAppointment
: !isInOutPatient ? TranslationBase.of(context).liveCare.toLowerCase().capitalizeFirstofEach
? TranslationBase.of(context).inPatient.toLowerCase().capitalizeFirstofEach : !isInOutPatient
: TranslationBase.of(context).outpatient.toLowerCase().capitalizeFirstofEach, ? TranslationBase.of(context).inPatient.toLowerCase().capitalizeFirstofEach
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w700, color: Colors.white, letterSpacing: -0.2, height: 16 / 10), : TranslationBase.of(context).outpatient.toLowerCase().capitalizeFirstofEach,
), style: TextStyle(fontSize: 10, fontWeight: FontWeight.w700, color: Colors.white, letterSpacing: -0.2, height: 16 / 10),
) : Container(), ),
)
: Container(),
), ),
Expanded( Expanded(
child: Padding( child: Padding(
@ -147,6 +149,7 @@ class DoctorCard extends StatelessWidget {
), ),
Row( Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
LargeAvatar( LargeAvatar(
name: name, name: name,
@ -201,14 +204,24 @@ class DoctorCard extends StatelessWidget {
], ],
), ),
), ),
if (onEmailTap != null && projectViewModel.havePrivilege(17)) SizedBox(
InkWell( height: 48,
onTap: onEmailTap, child: Align(
child: Icon( alignment: Alignment.bottomCenter,
Icons.email, child: (onEmailTap != null && projectViewModel.havePrivilege(17))
color: Theme.of(context).primaryColor, ? InkWell(
), onTap: onEmailTap,
child: Icon(
Icons.email,
color: Theme.of(context).primaryColor,
),
)
: Icon(
Icons.arrow_forward,
color: Theme.of(context).primaryColor,
),
), ),
),
], ],
), ),
], ],

@ -1,6 +1,10 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart';
import 'package:diplomaticquarterapp/models/header_model.dart'; import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.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/medical/doctor_card.dart';
@ -27,7 +31,7 @@ class DoctorHeader extends StatelessWidget {
this.isNeedToShowButton = true, this.isNeedToShowButton = true,
this.buttonIcon, this.buttonIcon,
this.showConfirmMessageDialog = true, this.showConfirmMessageDialog = true,
this.onRatingAndReviewTap}) @required this.onRatingAndReviewTap})
: super(key: key); : super(key: key);
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
@ -100,7 +104,11 @@ class DoctorHeader extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
InkWell( InkWell(
onTap: onRatingAndReviewTap, onTap: () {
if ((headerModel?.totalReviews ?? 0) > 0) {
getDoctorRatingsDetails(context);
}
},
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -122,10 +130,10 @@ class DoctorHeader extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: onRatingAndReviewTap != null ? Colors.blue[600] : Color(0xff2B353E), color: (headerModel?.totalReviews ?? 0) > 0 ? Colors.blue[600] : Color(0xff2B353E),
letterSpacing: -0.48, letterSpacing: -0.48,
height: 18 / 12, height: 18 / 12,
decoration: onRatingAndReviewTap != null ? TextDecoration.underline : null, decoration: (headerModel?.totalReviews ?? 0) > 0 ? TextDecoration.underline : null,
), ),
), ),
], ],
@ -141,7 +149,8 @@ class DoctorHeader extends StatelessWidget {
}, },
child: Container( child: Container(
padding: EdgeInsets.only(top: 10, bottom: 10, right: 21, left: 15), padding: EdgeInsets.only(top: 10, bottom: 10, right: 21, left: 15),
decoration: BoxDecoration(color: Color(0XFFD02127), borderRadius: projectViewModel.isArabic ? BorderRadius.only(topRight: Radius.circular(10)) : 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( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
@ -175,4 +184,220 @@ class DoctorHeader extends StatelessWidget {
), ),
); );
} }
void getDoctorRatingsDetails(context) {
GifLoaderDialogUtils.showMyDialog(context);
List<DoctorRateDetails> doctorDetailsList = List();
DoctorsListService service = new DoctorsListService();
service.getDoctorsRatingDetails(headerModel.doctorId, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
doctorDetailsList.clear();
res['DoctorRatingDetailsList'].forEach((v) {
doctorDetailsList.add(new DoctorRateDetails.fromJson(v));
});
showRatingDialog(doctorDetailsList, context);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
void showRatingDialog(List<DoctorRateDetails> doctorDetailsList, context) {
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: Dialog(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
// height: 400.0,
width: MediaQuery.of(context).size.width * 0.8,
color: Colors.white,
child: Column(
children: [
Container(
alignment: Alignment.center,
width: MediaQuery.of(context).size.width,
color: Theme.of(context).primaryColor,
margin: EdgeInsets.only(bottom: 5.0),
padding: EdgeInsets.all(10.0),
child: Text(TranslationBase.of(context).doctorRating, style: TextStyle(fontSize: 22.0, color: Colors.white))),
Container(margin: EdgeInsets.only(top: 0.0), child: Text(this.headerModel.actualDoctorRate.ceilToDouble().toString(), style: TextStyle(fontSize: 32.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 5.0),
alignment: Alignment.center,
child: RatingBar.readOnly(
initialRating: this.headerModel.actualDoctorRate.toDouble(),
size: 35.0,
filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500],
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(this.headerModel.totalReviews.toString() + " " + TranslationBase.of(context).reviews, style: TextStyle(fontSize: 14.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).excellent, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(doctorDetailsList[0].patientNumber),
height: 6.0,
child: Container(
color: Colors.green[700],
),
),
),
],
),
),
Container(
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).v_good, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(doctorDetailsList[1].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffB7B723),
),
),
),
],
),
),
Container(
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).good, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(doctorDetailsList[2].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffEBA727),
),
),
),
],
),
),
Container(
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).average, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(doctorDetailsList[3].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffEB7227),
),
),
),
],
),
),
Container(
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).below_average, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(doctorDetailsList[4].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffE20C0C),
),
),
),
],
),
),
Container(margin: EdgeInsets.only(top: 40.0), child: Divider()),
Container(
margin: EdgeInsets.only(top: 0.0),
child: Align(
alignment: FractionalOffset.bottomCenter,
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width,
height: 40.0,
child: RaisedButton(
elevation: 0.0,
color: Colors.white,
textColor: Colors.red,
hoverColor: Colors.transparent,
focusColor: Colors.transparent,
highlightColor: Colors.transparent,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
Navigator.of(context).pop();
},
child: Text(TranslationBase.of(context).cancel, style: TextStyle(fontSize: 18.0)),
),
),
),
),
],
),
),
],
),
),
),
);
},
transitionDuration: Duration(milliseconds: 500),
barrierDismissible: true,
barrierLabel: '',
context: context,
pageBuilder: (context, animation1, animation2) {});
}
double getRatingWidth(int patientNumber) {
var width = (patientNumber / this.headerModel.totalReviews) * 100;
return width;
}
} }

Loading…
Cancel
Save