Merge branch 'development_new_design_2.0' into haroon-new-design

# Conflicts:
#	lib/pages/MyAppointments/AppointmentDetails.dart
#	lib/uitl/translations_delegate_base.dart
merge-update-with-lab-changes
haroon amjad 4 years ago
commit 2690bddcac

@ -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': 'اضغط مرة أخرى للخروج من التطبيق'},
@ -917,7 +920,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"},
@ -1120,7 +1124,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": "من خلال هذه الخدمة يمكنك طلب مجموعة من الفحوصات التي تساعدك وتساعد طبيبك في فهم حالتك الصحية الحالية ومن ثم تحديد المخاطر المحتملة"
@ -1510,18 +1514,18 @@ 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": "Requested 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": "اين موقع المريض"},

@ -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);
} }

@ -178,7 +178,8 @@ class _NewHomeHealthCareStepThreePageState extends State<NewHomeHealthCareStepTh
context, context,
widget.model.orderId.toString(), widget.model.orderId.toString(),
onClick: () { onClick: () {
Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: HomeHealthCarePage)); Navigator.pop(context);
Navigator.push(context, FadePage(page: HomeHealthCarePage()));
}, },
); );
} }

@ -162,15 +162,21 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
TranslationBase.of(context).serviceName + ": ", TranslationBase.of(context).serviceName + ": ",
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
), ),
...List.generate( Column(
widget.model.hhcAllOrderDetail.length, children: [
(index) => Container( ...List.generate(
child: Texts( widget.model.hhcAllOrderDetail.length,
projectViewModel.isArabic ? widget.model.hhcAllOrderDetail[index].descriptionN : widget.model.hhcAllOrderDetail[index].description.capitalize(), (index) => Container(
fontSize: 13, child: Texts(
bold: false, projectViewModel.isArabic
), ? widget.model.hhcAllOrderDetail[index].descriptionN
), : widget.model.hhcAllOrderDetail[index].description.capitalize(),
fontSize: 13,
bold: false,
),
),
)
],
) )
], ],
) )

@ -121,7 +121,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
TranslationBase.of(context).serviceName + ": ", TranslationBase.of(context).hospital + ": ",
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
), ),
Expanded( Expanded(

@ -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,
"", "",

@ -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,

@ -51,6 +51,8 @@ class _AddMember extends State<AddMember> {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).myFamilyFiles, appBarTitle: TranslationBase.of(context).myFamilyFiles,
isShowAppBar: true, isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
body: isLoading == true body: isLoading == true
? AppCircularProgressIndicator() ? AppCircularProgressIndicator()
: SingleChildScrollView( : SingleChildScrollView(
@ -69,7 +71,7 @@ class _AddMember extends State<AddMember> {
Expanded( Expanded(
flex: 4, flex: 4,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, // mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[ children: <Widget>[
PhoneNumberSelectorWidget(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value), PhoneNumberSelectorWidget(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value),
//MobileNo(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value), //MobileNo(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value),
@ -88,24 +90,24 @@ class _AddMember extends State<AddMember> {
], ],
), ),
), ),
// Expanded( Expanded(
// flex: 3, flex: 3,
// child: Column( child: Column(
// mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
// children: <Widget>[ children: <Widget>[
// Row( Row(
// children: <Widget>[ children: <Widget>[
// Expanded( Expanded(
// child: DefaultButton( child: DefaultButton(
// TranslationBase.of(context).add, TranslationBase.of(context).add,
// () => {this.addMember()}, () => {this.addMember()},
// color: isButtonDisabled == true ? Colors.grey : Colors.grey[900], color: isButtonDisabled == true ? Colors.grey : Colors.red[600],
// textColor: Colors.white, textColor: Colors.white,
// )) ))
// ], ],
// ), ),
// ], ],
// )) ))
]), ]),
))); )));
} }

@ -6,6 +6,8 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.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/svg.dart';
import 'package:diplomaticquarterapp/widgets/habib_logo_widget.dart';
class AddFamilyMemberType extends StatelessWidget { class AddFamilyMemberType extends StatelessWidget {
static int loginType = 0; static int loginType = 0;
@ -14,139 +16,204 @@ class AddFamilyMemberType extends StatelessWidget {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).myFamilyFiles, appBarTitle: TranslationBase.of(context).myFamilyFiles,
isShowAppBar: true, isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
body: Padding( body: Padding(
padding: EdgeInsets.all(20), padding: EdgeInsets.only(bottom: 20, left: 21, right: 21),
child: Column( child: Column(children: [
children: <Widget>[ Expanded(
Expanded( child: ListView(
flex: 6, padding: EdgeInsets.zero,
child: Column( physics: BouncingScrollPhysics(),
// mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
crossAxisAlignment: CrossAxisAlignment.start, SizedBox(height: 12),
children: <Widget>[ HabibLogoWidget(),
Image.asset( SizedBox(height: 50),
'assets/images/habib-logo.png', Text(
height: 80, TranslationBase.of(context).logintypeRadio,
width: 80, style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
), ),
Padding( GridView(
padding: EdgeInsets.all(20), gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9),
child: AppText( physics: NeverScrollableScrollPhysics(),
TranslationBase.of(context).registerInfoFamily, padding: EdgeInsets.only(top: 25),
fontSize: SizeConfig.textMultiplier * 3.5, shrinkWrap: true,
textAlign: TextAlign.left, children: [
), getButton(context, TranslationBase.of(context).nationalIdNumber, 'assets/images/new/national_id.svg', 1),
), getButton(context, TranslationBase.of(context).medicalFileNumber, 'assets/images/new/medical_file.svg', 2),
Padding( ],
padding: EdgeInsets.all(20), ),
child: Row( SizedBox(height: 20),
mainAxisAlignment: MainAxisAlignment.center, // RichText(
children: <Widget>[ // text: TextSpan(
Expanded( // text: TranslationBase.of(context).forgotPassword,
child: InkWell( // style: TextStyle(decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffC9272B), letterSpacing: -0.48, height: 18 / 12),
onTap: () => { // recognizer: TapGestureRecognizer()..onTap = () => Navigator.of(context).push(FadePage(page: ForgotPassword())),
AddFamilyMemberType.loginType = 1, // ),
Navigator.of(context) // ),
.pushNamed(ADD_FAMILY_MEMBER) ],
}, ),
child: RoundedContainer( ),
borderColor: Colors.grey, // SizedBox(
showBorder: true, // height: 43,
child: Padding( // width: double.infinity,
padding: EdgeInsets.fromLTRB( // child: FlatButton(
20, 10, 20, 10), // onPressed: () {},
child: Column( // child: Text(
mainAxisAlignment: // TranslationBase.of(context).registerNow,
MainAxisAlignment.center, // style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.48),
children: <Widget>[ // ),
Image.asset( // color: Color(0xffD02127),
'assets/images/id_card_icon.png', // shape: RoundedRectangleBorder(
height: SizeConfig // borderRadius: BorderRadius.circular(6),
.imageSizeMultiplier * // ),
12, // ),
width: SizeConfig // ),
.imageSizeMultiplier * ]),
15, ));
), // body: Padding(
SizedBox( // padding: EdgeInsets.all(20),
height: 20, // child: Column(
), // children: <Widget>[
AppText( // Expanded(
TranslationBase.of(context) // flex: 6,
.idNo, // child: Column(
fontSize: SizeConfig // // mainAxisAlignment: MainAxisAlignment.spaceBetween,
.textMultiplier * // crossAxisAlignment: CrossAxisAlignment.start,
2, // children: <Widget>[
) // Image.asset(
], // 'assets/images/habib-logo.png',
), // height: 80,
)))), // width: 80,
Expanded( // ),
child: InkWell( // Padding(
onTap: () => { // padding: EdgeInsets.all(20),
AddFamilyMemberType.loginType = 2, // child: AppText(
Navigator.of(context) // TranslationBase.of(context).registerInfoFamily,
.pushNamed(ADD_FAMILY_MEMBER) // fontSize: SizeConfig.textMultiplier * 3.5,
}, // textAlign: TextAlign.left,
child: RoundedContainer( // ),
borderColor: Colors.grey, // ),
showBorder: true, // Padding(
child: Padding( // padding: EdgeInsets.all(20),
padding: EdgeInsets.fromLTRB( // child: Row(
25, 10, 25, 10), // mainAxisAlignment: MainAxisAlignment.center,
child: Column( // children: <Widget>[
children: <Widget>[ // Expanded(
Image.asset( // child: InkWell(
'assets/images/my_file_white_icon.png', // onTap: () => {AddFamilyMemberType.loginType = 1, Navigator.of(context).pushNamed(ADD_FAMILY_MEMBER)},
height: SizeConfig // child: RoundedContainer(
.imageSizeMultiplier * // borderColor: Colors.grey,
12, // showBorder: true,
width: SizeConfig // child: Padding(
.imageSizeMultiplier * // padding: EdgeInsets.fromLTRB(20, 10, 20, 10),
15, // child: Column(
), // mainAxisAlignment: MainAxisAlignment.center,
SizedBox( // children: <Widget>[
height: 20, // Image.asset(
), // 'assets/images/id_card_icon.png',
AppText( // height: SizeConfig.imageSizeMultiplier * 12,
TranslationBase.of(context) // width: SizeConfig.imageSizeMultiplier * 15,
.fileNo, // ),
fontSize: SizeConfig // SizedBox(
.textMultiplier * // height: 20,
2, // ),
) // AppText(
], // TranslationBase.of(context).idNo,
), // fontSize: SizeConfig.textMultiplier * 2,
)))) // )
], // ],
)), // ),
Divider( // )))),
color: Colors.grey, // Expanded(
height: 2, // child: InkWell(
), // onTap: () => {AddFamilyMemberType.loginType = 2, Navigator.of(context).pushNamed(ADD_FAMILY_MEMBER)},
]), // child: RoundedContainer(
), // borderColor: Colors.grey,
// Expanded( // showBorder: true,
// flex: 2, // child: Padding(
// child: Column( // padding: EdgeInsets.fromLTRB(25, 10, 25, 10),
// mainAxisAlignment: MainAxisAlignment.end, // child: Column(
// children: <Widget>[ // children: <Widget>[
// Row( // Image.asset(
// children: <Widget>[ // 'assets/images/my_file_white_icon.png',
// Expanded( // height: SizeConfig.imageSizeMultiplier * 12,
// child: DefaultButton( // width: SizeConfig.imageSizeMultiplier * 15,
// TranslationBase.of(context).registerNow, // ),
// () => { // SizedBox(
// Navigator.of(context).pushNamed( // height: 20,
// REGISTER, // ),
// ) // AppText(
// }, // TranslationBase.of(context).fileNo,
// )) // fontSize: SizeConfig.textMultiplier * 2,
// ], // )
// ), // ],
// ], // ),
// )) // ))))
], // ],
))); // )),
// Divider(
// color: Colors.grey,
// height: 2,
// ),
// ]),
// ),
// // Expanded(
// // flex: 2,
// // child: Column(
// // mainAxisAlignment: MainAxisAlignment.end,
// // children: <Widget>[
// // Row(
// // children: <Widget>[
// // Expanded(
// // child: DefaultButton(
// // TranslationBase.of(context).registerNow,
// // () => {
// // Navigator.of(context).pushNamed(
// // REGISTER,
// // )
// // },
// // ))
// // ],
// // ),
// // ],
// // ))
// ],
// )));
}
Widget getButton(BuildContext _context, String _title, String _icon, int _flag) {
return InkWell(
onTap: () {
AddFamilyMemberType.loginType = _flag;
Navigator.of(_context).pushNamed(ADD_FAMILY_MEMBER);
},
child: Container(
padding: EdgeInsets.only(left: 20, right: 20, bottom: 15, top: 28),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,
border: Border.all(
color: Color(0xffefefef),
width: 1,
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
SvgPicture.asset(
_icon,
height: 38,
width: 38,
),
Text(
_title,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16),
),
],
),
),
);
} }
} }

@ -80,6 +80,8 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
appBarTitle: TranslationBase.of(context).myFamilyFiles, appBarTitle: TranslationBase.of(context).myFamilyFiles,
isShowAppBar: widget.isAppbarVisible, isShowAppBar: widget.isAppbarVisible,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
showNewAppBar: true,
showNewAppBarTitle: true,
icon: "assets/images/new/bottom_nav/family_files.svg", icon: "assets/images/new/bottom_nav/family_files.svg",
description: TranslationBase.of(context).familyInfo, description: TranslationBase.of(context).familyInfo,
body: Scaffold( body: Scaffold(
@ -527,28 +529,31 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
var currentLang = await sharedPref.getString(APP_LANGUAGE); var currentLang = await sharedPref.getString(APP_LANGUAGE);
Provider.of<ProjectViewModel>(context, listen: false).setPrivilege(privilegeList: result, isLoginChild: true); Provider.of<ProjectViewModel>(context, listen: false).setPrivilege(privilegeList: result, isLoginChild: true);
result = list.CheckActivationCode.fromJson(result); result = list.CheckActivationCode.fromJson(result);
var familyFile = await sharedPref.getObject(FAMILY_FILE); var familyFile = await sharedPref.getObject(FAMILY_FILE);
result = list.CheckActivationCode.fromJson(result);
var mainUser = await sharedPref.getObject(MAIN_USER); var mainUser = await sharedPref.getObject(MAIN_USER);
var bloodType = await sharedPref.getString(BLOOD_TYPE); var loginType = await sharedPref.getInt(LAST_LOGIN);
this.sharedPref.clear(); this.sharedPref.clear();
if (mainUser["PatientID"] != result.list.patientID) { if (mainUser["PatientID"] != result.list.patientID) {
result.list.isFamily = true; result.list.isFamily = true;
} }
this.sharedPref.setString(APP_LANGUAGE, currentLang); this.sharedPref.setString(APP_LANGUAGE, currentLang);
this.sharedPref.setInt(LAST_LOGIN, loginType);
this.sharedPref.setObject(MAIN_USER, mainUser); this.sharedPref.setObject(MAIN_USER, mainUser);
this.sharedPref.setObject(USER_PROFILE, result.list); this.sharedPref.setObject(USER_PROFILE, result.list);
this.sharedPref.setObject(FAMILY_FILE, familyFile); this.sharedPref.setObject(FAMILY_FILE, familyFile);
this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID); this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID);
this.sharedPref.setString(TOKEN, result.authenticationTokenID); this.sharedPref.setString(TOKEN, result.authenticationTokenID);
await authenticatedUserObject.getUser(getUser: true); await authenticatedUserObject.getUser(getUser: true);
Provider.of<ProjectViewModel>(context, listen: false).user = authenticatedUserObject.user; Provider.of<ProjectViewModel>(context, listen: false).user = authenticatedUserObject.user;
Provider.of<ProjectViewModel>(context, listen: false).setUser(authenticatedUserObject.user); Provider.of<ProjectViewModel>(context, listen: false).setUser(authenticatedUserObject.user);
await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { // await pharmacyModuleViewModel.generatePharmacyToken().then((value) async {
if (pharmacyModuleViewModel.error.isNotEmpty) await pharmacyModuleViewModel.createUser(); // if (pharmacyModuleViewModel.error.isNotEmpty) await pharmacyModuleViewModel.createUser();
}); // });
appointmentRateViewModel appointmentRateViewModel
.getIsLastAppointmentRatedList() .getIsLastAppointmentRatedList()

@ -207,6 +207,6 @@ class RRTPlaceOrderPage extends StatelessWidget {
} }
gotoRRTRoot() { gotoRRTRoot() {
Navigator.popUntil(_context, (route) => Utils.route(route, equalsTo: ErOptions)); Navigator.popUntil(_context, (route) => Utils.route(route, equalsTo: RRTMainScreen));
} }
} }

@ -190,6 +190,7 @@ class RRTRequestPageState extends State<RRTRequestPage> {
else else
AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms); AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms);
}, },
color: acceptTerms ? Colors.red[600] : Colors.grey,
), ),
), ),
], ],

@ -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,
"", "",
@ -357,13 +358,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],
),
), ),
), ),
), ),

@ -391,14 +391,12 @@ class _ConfirmLogin extends State<ConfirmLogin> {
} }
loginWithFingurePrintFace(type, int isActive) async { loginWithFingurePrintFace(type, int isActive) async {
if (isActive == 1 || isActive ==0) { if (isActive == 1 || isActive == 0) {
const iosStrings = const iosStrings =
const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID'); const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID');
try { try {
authenticated = await auth.authenticateWithBiometrics(localizedReason: 'Scan your fingerprint to authenticate', useErrorDialogs: true, stickyAuth: true, iOSAuthStrings: iosStrings); authenticated = await auth.authenticateWithBiometrics(localizedReason: 'Scan your fingerprint to authenticate', useErrorDialogs: true, stickyAuth: true, iOSAuthStrings: iosStrings);
} on PlatformException catch (e) { } on PlatformException catch (e) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: 'Please enable your Touch or Face ID'); AppToast.showErrorToast(message: 'Please enable your Touch or Face ID');
@ -689,36 +687,36 @@ class _ConfirmLogin extends State<ConfirmLogin> {
), ),
); );
return InkWell( // return InkWell(
onTap: () { // onTap: () {
if (_flag == 0) { // if (_flag == 0) {
setState(() { // setState(() {
isMoreOption = true; // isMoreOption = true;
}); // });
} else { // } else {
authenticateUser(4, isActive: _loginIndex); // authenticateUser(4, isActive: _loginIndex);
} // }
}, // },
child: RoundedContainer( // child: RoundedContainer(
height: 150, // height: 150,
borderColor: Colors.grey, // borderColor: Colors.grey,
showBorder: true, // showBorder: true,
child: Padding( // child: Padding(
padding: EdgeInsets.fromLTRB(30, 15, 30, 15), // padding: EdgeInsets.fromLTRB(30, 15, 30, 15),
child: Column( // child: Column(
children: <Widget>[ // children: <Widget>[
Image.asset( // Image.asset(
_icon, // _icon,
height: SizeConfig.imageSizeMultiplier * 13, // height: SizeConfig.imageSizeMultiplier * 13,
width: SizeConfig.imageSizeMultiplier * 16, // width: SizeConfig.imageSizeMultiplier * 16,
), // ),
SizedBox( // SizedBox(
height: 20, // height: 20,
), // ),
Texts(_title, fontSize: SizeConfig.textMultiplier * 2, color: Colors.black) // Texts(_title, fontSize: SizeConfig.textMultiplier * 2, color: Colors.black)
], // ],
), // ),
))); // )));
} }
// todo 'sikander' optimize this after knowing usage // todo 'sikander' optimize this after knowing usage

@ -59,8 +59,7 @@ class LoginType extends StatelessWidget {
RichText( RichText(
text: TextSpan( text: TextSpan(
text: TranslationBase.of(context).forgotPassword, text: TranslationBase.of(context).forgotPassword,
style: TextStyle( style: TextStyle(decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffC9272B), letterSpacing: -0.48, height: 18 / 12),
decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffC9272B), letterSpacing: -0.48, height: 18 / 12),
recognizer: TapGestureRecognizer()..onTap = () => Navigator.of(context).push(FadePage(page: ForgotPassword())), recognizer: TapGestureRecognizer()..onTap = () => Navigator.of(context).push(FadePage(page: ForgotPassword())),
), ),
), ),
@ -88,141 +87,141 @@ class LoginType extends StatelessWidget {
), ),
); );
AppScaffold( // AppScaffold(
appBarTitle: TranslationBase.of(context).login, // appBarTitle: TranslationBase.of(context).login,
isShowAppBar: true, // isShowAppBar: true,
isShowDecPage: false, // isShowDecPage: false,
body: SingleChildScrollView( // body: SingleChildScrollView(
child: Container( // child: Container(
padding: EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30), // padding: EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30),
height: SizeConfig.realScreenHeight * .9, // height: SizeConfig.realScreenHeight * .9,
width: SizeConfig.realScreenWidth, // width: SizeConfig.realScreenWidth,
child: Column( // child: Column(
children: <Widget>[ // children: <Widget>[
Expanded( // Expanded(
flex: 4, // flex: 4,
child: Column( // child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly, // // mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ // children: <Widget>[
Image.asset( // Image.asset(
'assets/images/DQ/logo.png', // 'assets/images/DQ/logo.png',
height: 90, // height: 90,
width: 90, // width: 90,
), // ),
AppText( // AppText(
TranslationBase.of(context).logintypeRadio, // TranslationBase.of(context).logintypeRadio,
fontSize: SizeConfig.textMultiplier * 3.5, // fontSize: SizeConfig.textMultiplier * 3.5,
textAlign: TextAlign.start, // textAlign: TextAlign.start,
marginBottom: 20.0, // marginBottom: 20.0,
marginTop: 20.0, // marginTop: 20.0,
), // ),
Row( // Row(
mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ // children: <Widget>[
Expanded( // Expanded(
child: InkWell( // child: InkWell(
onTap: () => { // onTap: () => {
LoginType.loginType = 1, // LoginType.loginType = 1,
Navigator.of(context).push(FadePage(page: Login())), // Navigator.of(context).push(FadePage(page: Login())),
}, // },
child: RoundedContainer( // child: RoundedContainer(
borderColor: Colors.grey, // borderColor: Colors.grey,
showBorder: true, // showBorder: true,
child: Padding( // child: Padding(
padding: EdgeInsets.fromLTRB(20, 10, 20, 10), // padding: EdgeInsets.fromLTRB(20, 10, 20, 10),
child: Column( // child: Column(
mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ // children: <Widget>[
Image.asset( // Image.asset(
'assets/images/id_card_icon.png', // 'assets/images/id_card_icon.png',
height: SizeConfig.imageSizeMultiplier * 12, // height: SizeConfig.imageSizeMultiplier * 12,
width: SizeConfig.imageSizeMultiplier * 15, // width: SizeConfig.imageSizeMultiplier * 15,
), // ),
SizedBox( // SizedBox(
height: 20, // height: 20,
), // ),
AppText( // AppText(
TranslationBase.of(context).idNo, // TranslationBase.of(context).idNo,
fontSize: SizeConfig.textMultiplier * 2, // fontSize: SizeConfig.textMultiplier * 2,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
) // )
], // ],
), // ),
)))), // )))),
Expanded( // Expanded(
child: InkWell( // child: InkWell(
onTap: () => { // onTap: () => {
LoginType.loginType = 2, // LoginType.loginType = 2,
Navigator.of(context).push(FadePage(page: Login())), // Navigator.of(context).push(FadePage(page: Login())),
}, // },
child: RoundedContainer( // child: RoundedContainer(
borderColor: Colors.grey, // borderColor: Colors.grey,
showBorder: true, // showBorder: true,
child: Padding( // child: Padding(
padding: EdgeInsets.fromLTRB(25, 10, 25, 10), // padding: EdgeInsets.fromLTRB(25, 10, 25, 10),
child: Column( // child: Column(
children: <Widget>[ // children: <Widget>[
Image.asset( // Image.asset(
'assets/images/my_file_white_icon.png', // 'assets/images/my_file_white_icon.png',
height: SizeConfig.imageSizeMultiplier * 12, // height: SizeConfig.imageSizeMultiplier * 12,
width: SizeConfig.imageSizeMultiplier * 15, // width: SizeConfig.imageSizeMultiplier * 15,
), // ),
SizedBox( // SizedBox(
height: 20, // height: 20,
), // ),
AppText( // AppText(
TranslationBase.of(context).fileNo, // TranslationBase.of(context).fileNo,
fontSize: SizeConfig.textMultiplier * 2, // fontSize: SizeConfig.textMultiplier * 2,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
) // )
], // ],
), // ),
)))) // ))))
], // ],
), // ),
SizedBox( // SizedBox(
height: 25, // height: 25,
), // ),
Divider( // Divider(
color: Colors.grey, // color: Colors.grey,
height: 2, // height: 2,
), // ),
Center( // Center(
child: InkWell( // child: InkWell(
onTap: () => { // onTap: () => {
Navigator.of(context).push(FadePage(page: ForgotPassword())), // Navigator.of(context).push(FadePage(page: ForgotPassword())),
}, // },
child: AppText(TranslationBase.of(context).forgotPassword, fontSize: SizeConfig.textMultiplier * 2.5, marginTop: 20.0, underline: true))) // child: AppText(TranslationBase.of(context).forgotPassword, fontSize: SizeConfig.textMultiplier * 2.5, marginTop: 20.0, underline: true)))
]), // ]),
), // ),
Expanded( // Expanded(
flex: 1, // flex: 1,
child: Column( // child: Column(
mainAxisAlignment: MainAxisAlignment.end, // mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[ // children: <Widget>[
Divider( // Divider(
color: Colors.grey, // color: Colors.grey,
height: 2, // height: 2,
), // ),
SizedBox( // SizedBox(
height: 10, // height: 10,
), // ),
Row( // Row(
children: <Widget>[ // children: <Widget>[
Expanded( // Expanded(
child: DefaultButton( // child: DefaultButton(
TranslationBase.of(context).registerNow, // TranslationBase.of(context).registerNow,
() => { // () => {
Navigator.of(context).push(FadePage(page: Register())), // Navigator.of(context).push(FadePage(page: Register())),
}, // },
)), // )),
], // ],
), // ),
], // ],
)) // ))
], // ],
)))); // ))));
} }
Widget getButton(BuildContext _context, String _title, String _icon, int _flag) { Widget getButton(BuildContext _context, String _title, String _icon, int _flag) {

@ -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,
"", "",
@ -180,6 +181,32 @@ class PrescriptionDetailsPage extends StatelessWidget {
}, },
); );
return; return;
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: PrescriptionReminderDialog(
eventId: prescriptionReport.itemID.toString(),
title: "${prescriptionReport.itemDescriptionN} Prescription Reminder",
description: "${prescriptionReport.itemDescriptionN} ${prescriptionReport.frequencyN} ${prescriptionReport.routeN} ",
startDate: startDate,
endDate: endDate,
location: prescriptionReport.remarks,
days: 1,
),
),
);
},
transitionDuration: Duration(milliseconds: 500),
barrierDismissible: true,
barrierLabel: '',
context: context,
pageBuilder: (context, animation1, animation2) {});
}, },
iconData: Icons.notifications_active, iconData: Icons.notifications_active,
color: Color(0xffEAEAEA), color: Color(0xffEAEAEA),

@ -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(),

@ -232,7 +232,7 @@ class FamilyFilesProvider with ChangeNotifier {
var currentUser = AuthenticatedUser.fromJson(await sharedPref.getObject(MAIN_USER)); var currentUser = AuthenticatedUser.fromJson(await sharedPref.getObject(MAIN_USER));
request['PatientOutSA'] = currentUser.outSA; //? 1 : 0; request['PatientOutSA'] = currentUser.outSA; //? 1 : 0;
request['LoginType'] = await sharedPref.getInt(LAST_LOGIN); request['LoginType'] = await sharedPref.getInt(LAST_LOGIN) ?? 1;
request['MobileNo'] = currentUser.mobileNumber[0].toString() == "0" ? currentUser.mobileNumber.toString() : '0' + currentUser.mobileNumber.toString(); request['MobileNo'] = currentUser.mobileNumber[0].toString() == "0" ? currentUser.mobileNumber.toString() : '0' + currentUser.mobileNumber.toString();
request['PatientMobileNumber'] = currentUser.mobileNumber; //['MobileNumber']; request['PatientMobileNumber'] = currentUser.mobileNumber; //['MobileNumber'];
request['SearchType'] = 2; request['SearchType'] = 2;

@ -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];

@ -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