Merge branch 'diplomatic-quarter-live' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into hot_fix

 Conflicts:
	lib/config/localized_values.dart
	lib/pages/landing/home_page.dart
	lib/pages/medical/radiology/radiology_details_page.dart
	lib/uitl/translations_delegate_base.dart
merge-update-with-lab-changes
Mohammad Aljammal 5 years ago
commit a2ec01be5d

@ -522,12 +522,9 @@ const Map localizedValues = {
"PaymentOnline": {"en": "Service", "ar": "الالكتروني"}, "PaymentOnline": {"en": "Service", "ar": "الالكتروني"},
"OnlineCheckIn": {"en": "Online Check-In", "ar": "مدفوعات معلقة"}, "OnlineCheckIn": {"en": "Online Check-In", "ar": "مدفوعات معلقة"},
"MyBalances": {"en": "My Balances", "ar": "رصيدي"}, "MyBalances": {"en": "My Balances", "ar": "رصيدي"},
"BalanceAmount": { "en": "Wallet Amount", "ar": "مبلغ المحفظة"}, "BalanceAmount": {"en": "Wallet Amount", "ar": "مبلغ المحفظة"},
"TotalBalance": { "en": "Total Amount", "ar": "المبلغ الإجمالي"}, "TotalBalance": {"en": "Total Amount", "ar": "المبلغ الإجمالي"},
"CreateAdvancedPayment": { "CreateAdvancedPayment": {"en": "Recharge Wallet", "ar": "إعادة شحن المحفظة"},
"en": "Recharge Wallet",
"ar": "إعادة شحن المحفظة"
},
"AdvancePayment": {"en": "Advance Payment", "ar": "الدفع مقدما"}, "AdvancePayment": {"en": "Advance Payment", "ar": "الدفع مقدما"},
"AdvancePaymentLabel": { "AdvancePaymentLabel": {
"en": "en":
@ -1045,10 +1042,11 @@ const Map localizedValues = {
"ar": "ar":
"هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي." "هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي."
}, },
"dental-complains": { "update-succ": {
"en": "Symptoms", "en": "Successfully updated profile",
"ar": "الأعراض" "ar": "تم تحديث البيانات بنجاح"
}, },
"dental-complains": {"en": "Symptoms", "ar": "الأعراض"},
"empty-result": { "empty-result": {
"en": "There is no search results found", "en": "There is no search results found",
"ar": "لايوجد نتائج" "ar": "لايوجد نتائج"
@ -1078,120 +1076,40 @@ const Map localizedValues = {
"en": "Covid-19 Drive-Thru Test", "en": "Covid-19 Drive-Thru Test",
"ar": "فحص كورونا من داخل السيارة" "ar": "فحص كورونا من داخل السيارة"
}, },
"pharmacy": { "pharmacy": {"en": "Pharmacy", "ar": "الصيدلية"},
"en": "Pharmacy", "ereferral": {"en": "E-Referral", "ar": "طلب التحويل"},
"ar": "الصيدلية" "child-vaccine": {"en": "Child Vaccines", "ar": "تطعيمات الأطفال"},
}, "calculators": {"en": "Health Calculators", "ar": "الحاسبات الصحية"},
"ereferral": { "converters": {"en": "Health Converter", "ar": "تحويل القياسات"},
"en": "E-Referral", "h2o": {"en": "Water Tracker", "ar": "حساب كمية الماء"},
"ar": "طلب التحويل" "v-tour": {"en": "Virtual Tour", "ar": "جولة إفتراضية"},
}, "hmg-news": {"en": "HMG News", "ar": "أخبار المجموعة"},
"child-vaccine": { "blood-d": {"en": "Blood Donation", "ar": "تبرع بالدم"},
"en": "Child Vaccines", "symptomCheckerTitle": {"en": "Symptom Checker", "ar": "مدقق الأعراض"},
"ar": "تطعيمات الأطفال" "latest-news": {"en": "Latest News", "ar": "أحدث الأخبار"},
}, "our-location": {"en": "Our Locations", "ar": "موقعنا"},
"calculators": { "pharmacies": {"en": "Pharmacies", "ar": "الصيدليات"},
"en": "Health Calculators", "hospitals": {"en": "Hospitals", "ar": "المستشفيات"},
"ar": "الحاسبات الصحية" "wallet": {"en": "Wallet", "ar": "محفظة نقود"},
}, "hmg": {"en": "Al Habib", "ar": "الحبيب"},
"converters": {
"en": "Health Converter",
"ar": "تحويل القياسات"
},
"h2o": {
"en": "Water Tracker",
"ar": "حساب كمية الماء"
},
"v-tour": {
"en": "Virtual Tour",
"ar": "جولة إفتراضية"
},
"hmg-news": {
"en": "HMG News",
"ar": "أخبار المجموعة"
},
"blood-d": {
"en": "Blood Donation",
"ar": "تبرع بالدم"
},
"symptomCheckerTitle": {
"en": "Symptom Checker",
"ar": "مدقق الأعراض"
},
"latest-news": {
"en": "Latest News",
"ar": "أحدث الأخبار"
},
"our-location": {
"en": "Our Locations",
"ar": "موقعنا"
},
"pharmacies": {
"en": "Pharmacies",
"ar": "الصيدليات"
},
"hospitals": {
"en": "Hospitals",
"ar": "المستشفيات"
},
"wallet": {
"en": "Wallet",
"ar": "محفظة نقود"
},
"hmg": {
"en": "Al Habib",
"ar": "الحبيب"
},
"requested": { "requested": {"en": "Requested", "ar": "مطلوب"},
"en": "Requested", "ready": {"en": "Ready", "ar": "جاهز"},
"ar": "مطلوب" "completed": {"en": "Completed", "ar": "مكتمل"},
}, "cancelled": {"en": "Cancelled", "ar": "ملغى"},
"ready": {
"en": "Ready",
"ar": "جاهز"
},
"completed": {
"en": "Completed",
"ar": "مكتمل"
},
"cancelled": {
"en": "Cancelled",
"ar": "ملغى"
},
"request-medical-report": { "request-medical-report": {
"en": "Request medical report", "en": "Request medical report",
"ar": "طلب تقرير طبي" "ar": "طلب تقرير طبي"
}, },
"insur-cards": { "insur-cards": {"en": "Insurance Cards", "ar": "بطاقات التأمين"},
"en": "Insurance Cards", 'labResult': {"en": "Lab results", "ar": "نتائج التحاليل المخبرية"},
"ar": "بطاقات التأمين" 'details': {'en': 'Details', 'ar': 'التفاصيل'},
}, "age": {"en": "Age", "ar": "العمر"},
'labResult': { "active-insurence": {"en": "Active", "ar": "نشطة"},
"en": "Lab results", "not-active": {"en": "Not Active", "ar": "غير نشط"},
"ar": "نتائج التحاليل المخبرية" "card-detail": {"en": "Insurance Details", "ar": "منافعك التامينية"},
}, "Dr": {"en": "Dr. ", "ar": "الدكتور."},
'details':{
'en':'Details',
'ar':'التفاصيل'
},
"active-insurence": {
"en": "Active",
"ar": "نشطة"
},
"not-active": {
"en": "Not Active",
"ar": "غير نشط"
},
"card-detail": {
"en": "Insurance Details",
"ar": "منافعك التامينية"
},
"Dr": {
"en": "Dr. ",
"ar": "الدكتور."
},
"sendSuc":{ "sendSuc":{
"en":"A copy has been sent to the email", "en":"A copy has been sent to the email",
"ar":"تم إرسال نسخة إلى البريد الإلكتروني" "ar":"تم إرسال نسخة إلى البريد الإلكتروني"

@ -157,9 +157,13 @@ class BaseAppClient {
onFailure('Please Check The Internet Connection', -1); onFailure('Please Check The Internet Connection', -1);
} }
} catch (e) { } catch (e) {
print(e); //print(e);
onFailure('Failed to connect to the server', -1); //
// onFailure(e.toString(), -1); if (e is String) {
onFailure(e.toString(), -1);
} else {
onFailure('Failed to connect to the server', -1);
}
} }
} }

@ -325,7 +325,7 @@ class _BookConfirmState extends State<BookConfirm> {
Container( Container(
margin: EdgeInsets.only(top: 5.0), margin: EdgeInsets.only(top: 5.0),
child: Text( child: Text(
"Gender: " + TranslationBase.of(context).gender + ": " +
widget.authUser.genderDescription, widget.authUser.genderDescription,
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
@ -335,7 +335,7 @@ class _BookConfirmState extends State<BookConfirm> {
Container( Container(
margin: EdgeInsets.only(top: 5.0, bottom: 3.0), margin: EdgeInsets.only(top: 5.0, bottom: 3.0),
child: Text( child: Text(
"Age: " + widget.authUser.age.toString(), TranslationBase.of(context).age + ": " + widget.authUser.age.toString(),
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.grey[600], color: Colors.grey[600],

@ -53,17 +53,6 @@ class _DoctorProfileState extends State<DoctorProfile>
length: 2, length: 2,
vsync: this, vsync: this,
initialIndex: widget.isOpenAppt == true ? 1 : 0); initialIndex: widget.isOpenAppt == true ? 1 : 0);
// event.controller.stream.listen((p) {
// if (p['clinic_id'] != null &&
// p['doctor_id'] != null &&
// p['project_id'] != null) {
// setState(() {
// // need to take the data from here
// // dropdownValue = p['clinic_id'];
// });
// }
// });
_tabController = new TabController(length: 2, vsync: this); _tabController = new TabController(length: 2, vsync: this);
widget.authUser = new AuthenticatedUser(); widget.authUser = new AuthenticatedUser();
widget.doctor.speciality = widget.docProfileList.specialty; widget.doctor.speciality = widget.docProfileList.specialty;
@ -164,7 +153,7 @@ class _DoctorProfileState extends State<DoctorProfile>
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
"(" + "(" +
widget.doctor.noOfPatientsRate.toString() + widget.docProfileList.noOfPatientsRate.toString() +
" " + " " +
TranslationBase.of(context).reviews + TranslationBase.of(context).reviews +
")", ")",
@ -496,7 +485,7 @@ class _DoctorProfileState extends State<DoctorProfile>
} }
double getRatingWidth(int patientNumber) { double getRatingWidth(int patientNumber) {
var width = (patientNumber / this.widget.doctor.noOfPatientsRate) * 100; var width = (patientNumber / this.widget.docProfileList.noOfPatientsRate) * 100;
return width; return width;
} }

@ -380,6 +380,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}); });
} }

@ -13,6 +13,7 @@ class DoctorInformation extends StatelessWidget {
return Container( return Container(
margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
Card( Card(
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
@ -106,6 +107,7 @@ class DoctorInformation extends StatelessWidget {
Container( Container(
margin: EdgeInsets.fromLTRB(20.0, 0.0, 10.0, 5.0), margin: EdgeInsets.fromLTRB(20.0, 0.0, 10.0, 5.0),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
_getNormalText(docProfileList.doctorProfileInfo) _getNormalText(docProfileList.doctorProfileInfo)
], ],
@ -123,7 +125,6 @@ class DoctorInformation extends StatelessWidget {
return Text(text, return Text(text,
style: TextStyle( style: TextStyle(
fontSize: 13, fontSize: 13,
fontFamily: 'Open-Sans',
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
letterSpacing: 0.5, letterSpacing: 0.5,
color: Colors.grey[800])); color: Colors.grey[800]));
@ -133,9 +134,9 @@ class DoctorInformation extends StatelessWidget {
return Container( return Container(
margin: EdgeInsets.only(top: 5.0), margin: EdgeInsets.only(top: 5.0),
child: Text(text, child: Text(text,
maxLines: 16,
style: TextStyle( style: TextStyle(
fontSize: 13, fontSize: 13,
fontFamily: 'Open-Sans',
letterSpacing: 0.5, letterSpacing: 0.5,
color: Colors.grey[700])), color: Colors.grey[700])),
); );
@ -151,7 +152,7 @@ class DoctorInformation extends StatelessWidget {
Text(text.trim(), Text(text.trim(),
style: TextStyle( style: TextStyle(
fontSize: 13, fontSize: 13,
fontFamily: 'Open-Sans',
letterSpacing: 0.5, letterSpacing: 0.5,
color: Colors.grey[700])), color: Colors.grey[700])),
Container( Container(

@ -1,11 +1,17 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookConfirm.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/BookConfirm.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/DocAvailableAppointments.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/components/DocAvailableAppointments.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.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/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/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
import 'widgets/AppointmentActions.dart'; import 'widgets/AppointmentActions.dart';
@ -26,6 +32,8 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
with SingleTickerProviderStateMixin { with SingleTickerProviderStateMixin {
static TabController _tabController; static TabController _tabController;
List<DoctorRateDetails> doctorDetailsList = List();
@override @override
void initState() { void initState() {
_tabController = new TabController(length: 2, vsync: this); _tabController = new TabController(length: 2, vsync: this);
@ -34,38 +42,38 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
@override @override
void dispose() { void dispose() {
// TODO: implement dispose
super.dispose(); super.dispose();
_tabController.dispose(); _tabController.dispose();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: widget.appo.doctorNameObj, appBarTitle: widget.appo.doctorNameObj,
isShowAppBar: true, isShowAppBar: true,
bottomSheet: AppointmentDetails.showFooterButton bottomSheet: AppointmentDetails.showFooterButton
? Container( ? Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: 50.0, height: 50.0,
margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
child: ButtonTheme( child: ButtonTheme(
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0), borderRadius: BorderRadius.circular(10.0),
), ),
minWidth: MediaQuery.of(context).size.width * 0.7, minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0, height: 45.0,
child: RaisedButton( child: RaisedButton(
color: new Color(0xFF60686b), color: new Color(0xFF60686b),
textColor: Colors.white, textColor: Colors.white,
disabledTextColor: Colors.white, disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4), disabledColor: new Color(0xFFbcc2c4),
onPressed: goToBookConfirm, onPressed: goToBookConfirm,
child: Text(TranslationBase.of(context).bookNow, child: Text(TranslationBase.of(context).bookNow,
style: TextStyle(fontSize: 18.0)), style: TextStyle(fontSize: 18.0)),
), ),
), ),
) )
: null, : null,
body: Container( body: Container(
color: new Color(0xFFf6f6f6), color: new Color(0xFFf6f6f6),
@ -88,7 +96,8 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
), ),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), margin:
EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
widget.appo.doctorTitle + widget.appo.doctorTitle +
@ -103,7 +112,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.center, alignment: Alignment.center,
child: Text(widget.appo.clinicName, child: Text(getDoctorSpeciality(widget.appo.doctorSpeciality),
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.grey[900], color: Colors.grey[900],
@ -123,19 +132,37 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
emptyIcon: Icons.star, emptyIcon: Icons.star,
), ),
), ),
InkWell(
onTap: () {
getDoctorRatingsDetails();
},
child: Container(
margin: EdgeInsets.only(top: 5.0),
alignment: Alignment.center,
child: Text(
"(" +
widget.appo.noOfPatientsRate.toString() +
" " +
TranslationBase.of(context).reviews +
")",
style: TextStyle(
fontSize: 14.0,
color: Colors.blue[800],
letterSpacing: 1.0,
decoration: TextDecoration.underline,
)),
),
),
Container( Container(
margin: EdgeInsets.only(top: 5.0),
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(DateUtil.getWeekDayMonthDayYearDateFormatted(
"(" + DateUtil.convertStringToDate(
widget.appo.noOfPatientsRate.toString() + widget.appo.appointmentDate),
" Reviews)", projectViewModel.isArabic ? "ar" : "en")),
style: TextStyle( ),
fontSize: 14.0, Container(
color: Colors.blue[800], alignment: Alignment.center,
letterSpacing: 1.0, child: Text(widget.appo.startTime),
decoration: TextDecoration.underline,
)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
@ -171,8 +198,14 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
child: TabBarView( child: TabBarView(
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
children: [ children: [
AppointmentActions(appo: widget.appo, tabController: _tabController, enableFooterButton: enableFooterButton), AppointmentActions(
DocAvailableAppointments(doctor: getDoctorObject(), isLiveCareAppointment: widget.appo.isLiveCareAppointment) appo: widget.appo,
tabController: _tabController,
enableFooterButton: enableFooterButton),
DocAvailableAppointments(
doctor: getDoctorObject(),
isLiveCareAppointment:
widget.appo.isLiveCareAppointment)
], ],
controller: _tabController, controller: _tabController,
), ),
@ -208,7 +241,292 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
selectedTime: DocAvailableAppointments.selectedTime))); selectedTime: DocAvailableAppointments.selectedTime)));
} }
getDoctorRatingsDetails() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.getDoctorsRatingDetails(widget.appo.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);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
void showRatingDialog(List<DoctorRateDetails> doctorDetailsList) {
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
.widget
.appo
.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.widget.appo.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.widget.appo.noOfPatientsRate.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.widget.appo.noOfPatientsRate) * 100;
return width;
}
String getDate(String date) {
DateTime dateObj = DateUtil.convertStringToDate(date);
return DateUtil.getWeekDay(dateObj.weekday) +
", " +
dateObj.day.toString() +
" " +
DateUtil.getMonth(dateObj.month) +
" " +
dateObj.year.toString();
}
String getDoctorSpeciality(List<String> docSpecial) {
String docSpeciality = "";
docSpecial.forEach((v) {
docSpeciality = docSpeciality + v + " ";
});
return docSpeciality;
}
DoctorList getDoctorObject() { DoctorList getDoctorObject() {
DoctorList docObj = new DoctorList(); DoctorList docObj = new DoctorList();

@ -419,4 +419,6 @@ class _MyAppointmentsState extends State<MyAppointments>
), ),
); );
} }
} }

@ -40,7 +40,7 @@ class ArrivedButtons {
"caller": "insertComplaint" "caller": "insertComplaint"
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).insurance, "title": TranslationBase.of(AppGlobal.context).insuranceApproval,
"subtitle": TranslationBase.of(AppGlobal.context).insuranceSubtitle, "subtitle": TranslationBase.of(AppGlobal.context).insuranceSubtitle,
"icon": "assets/images/new-design/insurance_approvals_icon.png", "icon": "assets/images/new-design/insurance_approvals_icon.png",
"caller": "Insurance" "caller": "Insurance"
@ -58,4 +58,4 @@ class ArrivedButtons {
"caller": "Survey" "caller": "Survey"
} }
]; ];
} }

@ -88,7 +88,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
Container( Container(
// height: 100.0, // height: 100.0,
margin: EdgeInsets.all(7.0), margin: EdgeInsets.all(7.0),
padding: EdgeInsets.only(bottom: 15.0), padding: EdgeInsets.only(bottom: 4.0),
decoration: BoxDecoration( decoration: BoxDecoration(
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
@ -437,12 +437,11 @@ class _AppointmentActionsState extends State<AppointmentActions> {
navigateToMedicinePrescriptionReport( navigateToMedicinePrescriptionReport(
prescriptionReportEnhList, res['ListPRM']); prescriptionReportEnhList, res['ListPRM']);
} else { } else {
AppToast.showErrorToast(message: "Sorry there is no data"); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); // AppToast.showErrorToast(message: err);
AppToast.showErrorToast(message: err);
}); });
} }

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -5,6 +6,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_countdown_timer/current_remaining_time.dart'; import 'package:flutter_countdown_timer/current_remaining_time.dart';
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart'; import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
import '../AppointmentDetails.dart'; import '../AppointmentDetails.dart';
@ -23,6 +25,7 @@ class AppointmentCard extends StatefulWidget {
class _ApointmentCardState extends State<AppointmentCard> { class _ApointmentCardState extends State<AppointmentCard> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return InkWell( return InkWell(
onTap: () { onTap: () {
navigateToAppointmentDetails(context, widget.appo); navigateToAppointmentDetails(context, widget.appo);
@ -46,7 +49,7 @@ class _ApointmentCardState extends State<AppointmentCard> {
fit: BoxFit.fill, height: 60.0, width: 60.0), fit: BoxFit.fill, height: 60.0, width: 60.0),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.57, width: MediaQuery.of(context).size.width * 0.61,
margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0), margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -77,7 +80,12 @@ class _ApointmentCardState extends State<AppointmentCard> {
), ),
Container( Container(
margin: EdgeInsets.only(top: 3.0, bottom: 3.0), margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
child: Text(getDate(widget.appo.appointmentDate).trim(), child: Text(
DateUtil.getWeekDayMonthDayYearDateFormatted(
DateUtil.convertStringToDate(
widget.appo.appointmentDate),
projectViewModel.isArabic ? "ar" : "en")
.trim(),
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.grey[600], color: Colors.grey[600],
@ -101,30 +109,38 @@ class _ApointmentCardState extends State<AppointmentCard> {
Container( Container(
transform: transform:
Matrix4.translationValues(15.0, -40.0, 0.0), Matrix4.translationValues(15.0, -40.0, 0.0),
child: Image.asset( child: projectViewModel.isArabic
"assets/images/new-design/arrow.png", ? Image.asset(
width: 25.0, "assets/images/new-design/arrow_menu_black-ar.png",
height: 25.0), width: 25.0,
height: 25.0)
: Image.asset(
"assets/images/new-design/arrow_menu_black-en.png",
width: 25.0,
height: 25.0),
), ),
], ],
), ),
widget.appo.patientStatusType == AppointmentType.BOOKED ? (widget.appo.patientStatusType == AppointmentType.BOOKED ||
Container( widget.appo.patientStatusType ==
child: CountdownTimer( AppointmentType.CONFIRMED)
endTime: DateTime.now().millisecondsSinceEpoch + ? Container(
(widget.appo.remaniningHoursTocanPay * 1000) * child: CountdownTimer(
60, endTime: DateTime.now().millisecondsSinceEpoch +
widgetBuilder: (_, CurrentRemainingTime time) { (widget.appo.remaniningHoursTocanPay * 1000) *
return Text( 60,
'${time.days}:${time.hours}:${time.min}:${time.sec} ' + widgetBuilder: (_, CurrentRemainingTime time) {
TranslationBase.of(context) return Text(
.upcomingTimeLeft, '${time.days}:${time.hours}:${time.min}:${time.sec} ' +
style: TextStyle( TranslationBase.of(context)
fontSize: 12.0, .upcomingTimeLeft,
color: Color(0xff40ACC9))); style: TextStyle(
}, fontSize: 12.0,
), color: Color(0xff40ACC9)));
) : Container(), },
),
)
: Container(),
], ],
), ),
), ),

@ -62,7 +62,7 @@ class _ToDoState extends State<ToDo> {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).todoList, appBarTitle: TranslationBase.of(context).todoList,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
isShowAppBar: true, isShowAppBar: false,
description: TranslationBase.of(context).infoTodo, description: TranslationBase.of(context).infoTodo,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(
@ -212,17 +212,23 @@ class _ToDoState extends State<ToDo> {
), ),
Container( Container(
child: CountdownTimer( child: CountdownTimer(
endTime: DateTime.now().millisecondsSinceEpoch + endTime: DateTime.now()
.millisecondsSinceEpoch +
(widget.appoList[index] (widget.appoList[index]
.remaniningHoursTocanPay * .remaniningHoursTocanPay *
1000) * 1000) *
60, 60,
widgetBuilder: (_, CurrentRemainingTime time) { widgetBuilder:
(_, CurrentRemainingTime time) {
return Text( return Text(
'${time.days}:${time.hours}:${time.min}:${time.sec} ' + TranslationBase.of(context).upcomingTimeLeft, '${time.days}:${time.hours}:${time.min}:${time.sec} ' +
TranslationBase.of(
context)
.upcomingTimeLeft,
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Color(0xff40ACC9))); color:
Color(0xff40ACC9)));
}, },
), ),
), ),
@ -529,7 +535,7 @@ class _ToDoState extends State<ToDo> {
}).catchError((err) { }).catchError((err) {
print(err); print(err);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err); err != null ?? AppToast.showErrorToast(message: err);
}); });
} }

@ -27,7 +27,7 @@ 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:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import '../../locator.dart'; import '../../locator.dart';
class HomePage extends StatefulWidget { class HomePage extends StatefulWidget {
@ -43,8 +43,8 @@ class _HomePageState extends State<HomePage> {
ToDoCountProviderModel toDoProvider; ToDoCountProviderModel toDoProvider;
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>(); AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -687,7 +687,7 @@ class _HomePageState extends State<HomePage> {
], ],
), ),
), ),
height: 100, height: 106,
imageName: 'ask_doctor_bg.png', imageName: 'ask_doctor_bg.png',
//color: Colors.grey[700], //color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45, width: MediaQuery.of(context).size.width * 0.45,
@ -780,7 +780,9 @@ class DashboardItem extends StatelessWidget {
this.width, this.width,
this.height, this.height,
this.color, this.color,
this.opacity = 1.0,this.icon,this.margin=0}) this.opacity = 1.0,
this.icon,
this.margin = 0})
: super(key: key); : super(key: key);
final bool hasBorder; final bool hasBorder;
final String imageName; final String imageName;

@ -52,6 +52,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
var notificationCount = ''; var notificationCount = '';
var themeNotifier; var themeNotifier;
///inject the user data ///inject the user data
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>(); locator<AuthenticatedUserObject>();
@ -140,18 +141,17 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
_firebaseMessaging.setAutoInitEnabled(true); _firebaseMessaging.setAutoInitEnabled(true);
locationUtils = locationUtils =
new LocationUtils(isShowConfirmDialog: true, context: context); new LocationUtils(isShowConfirmDialog: true, context: context);
WidgetsBinding.instance WidgetsBinding.instance
.addPostFrameCallback((_) => locationUtils.getCurrentLocation()); .addPostFrameCallback((_) => locationUtils.getCurrentLocation());
if (Platform.isIOS) { if (Platform.isIOS) {
_firebaseMessaging.requestNotificationPermissions(); _firebaseMessaging.requestNotificationPermissions();
} }
_firebaseMessaging.getToken().then((String token) async { _firebaseMessaging.getToken().then((String token) async {
sharedPref.setString(PUSH_TOKEN, token); sharedPref.setString(PUSH_TOKEN, token);
if (token != null && await sharedPref.getObject(USER_PROFILE) ==null) { if (token != null && await sharedPref.getObject(USER_PROFILE) == null) {
DEVICE_TOKEN = token; DEVICE_TOKEN = token;
checkUserStatus(token); checkUserStatus(token);
} }
@ -159,122 +159,124 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
}).catchError((err) { }).catchError((err) {
print(err); print(err);
}); });
//
// //_firebase Background message handler
Future.delayed(Duration.zero, () => setTheme()); Future.delayed(Duration.zero, () => setTheme());
//_firebase Background message handler //_firebase Background message handler
// _firebaseMessaging.configure( // _firebaseMessaging.configure(
// onMessage: (Map<String, dynamic> message) async { // // onMessage: (Map<String, dynamic> message) async {
// showDialog("onMessage: $message"); // // showDialog("onMessage: $message");
// print("onMessage: $message"); // // print("onMessage: $message");
// print(message); // // print(message);
// print(message['name']); // // print(message['name']);
// print(message['appointmentdate']); // // print(message['appointmentdate']);
// // //
// if (Platform.isIOS) { // // if (Platform.isIOS) {
// if (message['is_call'] == "true") { // // if (message['is_call'] == "true") {
// var route = ModalRoute.of(context); // // var route = ModalRoute.of(context);
// // //
// if (route != null) { // // if (route != null) {
// print(route.settings.name); // // print(route.settings.name);
// } // // }
// // //
// Map<String, dynamic> myMap = new Map<String, dynamic>.from(message); // // Map<String, dynamic> myMap = new Map<String, dynamic>.from(message);
// print(myMap); // // print(myMap);
// LandingPage.isOpenCallPage = true; // // LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); // // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) { // // if (!isPageNavigated) {
// isPageNavigated = true; // // isPageNavigated = true;
// Navigator.push( // // Navigator.push(
// context, // // context,
// MaterialPageRoute( // // MaterialPageRoute(
// builder: (context) => IncomingCall( // // builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData))) // // incomingCallData: LandingPage.incomingCallData)))
// .then((value) { // // .then((value) {
// isPageNavigated = false; // // isPageNavigated = false;
// }); // // });
// } // // }
// } else { // // } else {
// print("Is Call Not Found iOS"); // // print("Is Call Not Found iOS");
// } // // }
// } else { // // } else {
// print("Is Call Not Found iOS"); // // print("Is Call Not Found iOS");
// } // // }
// // //
// if (Platform.isAndroid) { // // if (Platform.isAndroid) {
// if (message['data'].containsKey("is_call")) { // // if (message['data'].containsKey("is_call")) {
// var route = ModalRoute.of(context); // // var route = ModalRoute.of(context);
// // //
// if (route != null) { // // if (route != null) {
// print(route.settings.name); // // print(route.settings.name);
// } // // }
// // //
// Map<String, dynamic> myMap = // // Map<String, dynamic> myMap =
// new Map<String, dynamic>.from(message['data']); // // new Map<String, dynamic>.from(message['data']);
// print(myMap); // // print(myMap);
// LandingPage.isOpenCallPage = true; // // LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); // // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) { // // if (!isPageNavigated) {
// isPageNavigated = true; // // isPageNavigated = true;
// Navigator.push( // // Navigator.push(
// context, // // context,
// MaterialPageRoute( // // MaterialPageRoute(
// builder: (context) => IncomingCall( // // builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData))) // // incomingCallData: LandingPage.incomingCallData)))
// .then((value) { // // .then((value) {
// isPageNavigated = false; // // isPageNavigated = false;
// }); // // });
// } // // }
// } else { // // } else {
// print("Is Call Not Found Android"); // // print("Is Call Not Found Android");
// } // // }
// } else { // // } else {
// print("Is Call Not Found Android"); // // print("Is Call Not Found Android");
// } // // }
// }, // // },
// onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler, // // onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler,
// onLaunch: (Map<String, dynamic> message) async { // // onLaunch: (Map<String, dynamic> message) async {
// print("onLaunch: $message"); // // print("onLaunch: $message");
// showDialog("onLaunch: $message"); // // showDialog("onLaunch: $message");
// }, // // },
// onResume: (Map<String, dynamic> message) async { // // onResume: (Map<String, dynamic> message) async {
// print("onResume: $message"); // // print("onResume: $message");
// print(message); // // print(message);
// print(message['name']); // // print(message['name']);
// print(message['appointmentdate']); // // print(message['appointmentdate']);
// // //
// showDialog("onResume: $message"); // // showDialog("onResume: $message");
// // //
// if (Platform.isIOS) { // // if (Platform.isIOS) {
// if (message['is_call'] == "true") { // // if (message['is_call'] == "true") {
// var route = ModalRoute.of(context); // // var route = ModalRoute.of(context);
// // //
// if (route != null) { // // if (route != null) {
// print(route.settings.name); // // print(route.settings.name);
// } // // }
// // //
// Map<String, dynamic> myMap = // // Map<String, dynamic> myMap =
// new Map<String, dynamic>.from(message); // // new Map<String, dynamic>.from(message);
// print(myMap); // // print(myMap);
// LandingPage.isOpenCallPage = true; // // LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); // // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) { // // if (!isPageNavigated) {
// isPageNavigated = true; // // isPageNavigated = true;
// Navigator.push( // // Navigator.push(
// context, // // context,
// MaterialPageRoute( // // MaterialPageRoute(
// builder: (context) => IncomingCall( // // builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData))) // // incomingCallData: LandingPage.incomingCallData)))
// .then((value) { // // .then((value) {
// isPageNavigated = false; // // isPageNavigated = false;
// }); // // });
// } // // }
// } else { // // } else {
// print("Is Call Not Found iOS"); // // print("Is Call Not Found iOS");
// } // // }
// } else { // // } else {
// print("Is Call Not Found iOS"); // // print("Is Call Not Found iOS");
// } // // }
// }, // // },
// ); // );
} }
showDialogs(String message) { showDialogs(String message) {
@ -390,7 +392,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
notificationCount, notificationCount,
style: new TextStyle( style: new TextStyle(
color: Colors.white, color: Colors.white,
fontSize: projectViewModel.isArabic ? 8 : 9, fontSize: projectViewModel.isArabic ? 8 : 9,
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
@ -414,7 +416,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
SETTINGS, SETTINGS,
); );
else else
login(); login();
}, //do something, }, //do something,
) )
], ],
@ -428,7 +430,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
children: [ children: [
HomePage( HomePage(
goToMyProfile: () { goToMyProfile: () {
_changeCurrentTab(1); // _changeCurrentTab(1);
}, },
), ),
MedicalProfilePage(), MedicalProfilePage(),
@ -464,50 +466,51 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
case 2: case 2:
return TranslationBase.of(context).bookAppo; return TranslationBase.of(context).bookAppo;
case 3: case 3:
return TranslationBase.of(context).myFamily;
case 4:
return TranslationBase.of(context).services; return TranslationBase.of(context).services;
case 4:
return TranslationBase.of(context).bookAppo;
} }
} }
setTheme() async{
// setTheme() async {
// defaultTheme = //
// ThemeData( // defaultTheme =
// fontFamily:projectViewModel.isArabic ? 'Cairo' : 'WorkSans', // ThemeData(
// primarySwatch: Colors.blue, // fontFamily:projectViewModel.isArabic ? 'Cairo' : 'WorkSans',
// visualDensity: VisualDensity.adaptivePlatformDensity, // primarySwatch: Colors.blue,
// brightness: Brightness.light, // visualDensity: VisualDensity.adaptivePlatformDensity,
// pageTransitionsTheme: const PageTransitionsTheme( // brightness: Brightness.light,
// builders: { // pageTransitionsTheme: const PageTransitionsTheme(
// TargetPlatform.android: ZoomPageTransitionsBuilder(), // builders: {
// TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), // TargetPlatform.android: ZoomPageTransitionsBuilder(),
// }, // TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
// ), // },
// hintColor: Colors.grey[400], // ),
// disabledColor: Colors.grey[300], // hintColor: Colors.grey[400],
// errorColor: Color.fromRGBO(235, 80, 60, 1.0), // disabledColor: Colors.grey[300],
// scaffoldBackgroundColor: Color(0xffEEEEEE), // errorColor: Color.fromRGBO(235, 80, 60, 1.0),
// textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), // scaffoldBackgroundColor: Color(0xffEEEEEE),
// textSelectionHandleColor: Colors.grey, // textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
// canvasColor: Colors.white, // textSelectionHandleColor: Colors.grey,
// backgroundColor: Colors.white, // canvasColor: Colors.white,
// highlightColor: Colors.grey[100].withOpacity(0.4), // backgroundColor: Colors.white,
// splashColor: Colors.transparent, // highlightColor: Colors.grey[100].withOpacity(0.4),
// primaryColor: Color(0xff40ACC9), // splashColor: Colors.transparent,
// bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)), // primaryColor: Color(0xff40ACC9),
// cursorColor: Colors.grey, // bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)),
// cardColor: Colors.white, // cursorColor: Colors.grey,
// iconTheme: IconThemeData(), // cardColor: Colors.white,
// appBarTheme: AppBarTheme( // iconTheme: IconThemeData(),
// color: Color(0xff40ACC9), // appBarTheme: AppBarTheme(
// brightness: Brightness.dark, // color: Color(0xff40ACC9),
// elevation: 10.0, // brightness: Brightness.dark,
// actionsIconTheme: IconThemeData( // elevation: 10.0,
// color: Color(0xff40ACC9), // actionsIconTheme: IconThemeData(
// ), // color: Color(0xff40ACC9),
// ), // ),
// ); // ),
// themeNotifier.setTheme(defaultTheme); // );
// themeNotifier.setTheme(defaultTheme);
} }
void checkUserStatus(token) async { void checkUserStatus(token) async {
authService authService
@ -522,8 +525,9 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
.then((res) => {print(res)}); .then((res) => {print(res)});
authService.getDashboard().then((value) => { authService.getDashboard().then((value) => {
setState(() { setState(() {
notificationCount = value['List_PatientDashboard'] notificationCount = value['List_PatientDashboard'][0]
[0]['UnreadPatientNotificationCount'].toString(); ['UnreadPatientNotificationCount']
.toString();
}) })
}); });
} }
@ -555,6 +559,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
_changeCurrentTab(2); _changeCurrentTab(2);
} }
} }
login() async { login() async {
var data = await sharedPref.getObject(IMEI_USER_DATA); var data = await sharedPref.getObject(IMEI_USER_DATA);
sharedPref.remove(REGISTER_DATA_FOR_LOGIIN); sharedPref.remove(REGISTER_DATA_FOR_LOGIIN);

@ -14,159 +14,168 @@ class LoginType extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).login, appBarTitle: TranslationBase.of(context).login,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
body: Padding( body: SingleChildScrollView(
padding: EdgeInsets.all(20), child: Container(
child: Column( padding:
children: <Widget>[ EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30),
Expanded( height: SizeConfig.realScreenHeight * .9,
flex: 4, width: SizeConfig.realScreenWidth,
child: Column( child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: <Widget>[
crossAxisAlignment: CrossAxisAlignment.start, Expanded(
children: <Widget>[ flex: 4,
Image.asset( child: Column(
'assets/images/DQ/dq_logo_icon.png', // mainAxisAlignment: MainAxisAlignment.spaceEvenly,
height: 90, crossAxisAlignment: CrossAxisAlignment.start,
width: 90,
),
AppText(
TranslationBase.of(context).logintypeRadio,
fontSize: SizeConfig.textMultiplier * 3.5,
textAlign: TextAlign.start,
marginBottom: 20.0,
marginTop: 20.0,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Expanded( Image.asset(
child: InkWell( 'assets/images/DQ/dq_logo_icon.png',
onTap: () => { height: 90,
LoginType.loginType = 1, width: 90,
Navigator.of(context) ),
.pushNamed(LOGIN_PAGE) AppText(
}, TranslationBase.of(context).logintypeRadio,
child: RoundedContainer( fontSize: SizeConfig.textMultiplier * 3.5,
borderColor: Colors.grey, textAlign: TextAlign.start,
showBorder: true, marginBottom: 20.0,
child: Padding( marginTop: 20.0,
padding: EdgeInsets.fromLTRB( ),
20, 10, 20, 10), Row(
child: Column( mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment: children: <Widget>[
MainAxisAlignment.center, Expanded(
children: <Widget>[ child: InkWell(
Image.asset( onTap: () => {
'assets/images/id_card_icon.png', LoginType.loginType = 1,
height: SizeConfig Navigator.of(context)
.imageSizeMultiplier * .pushNamed(LOGIN_PAGE)
12, },
width: SizeConfig child: RoundedContainer(
.imageSizeMultiplier * borderColor: Colors.grey,
15, showBorder: true,
), child: Padding(
SizedBox( padding: EdgeInsets.fromLTRB(
height: 20, 20, 10, 20, 10),
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Image.asset(
'assets/images/id_card_icon.png',
height: SizeConfig
.imageSizeMultiplier *
12,
width: SizeConfig
.imageSizeMultiplier *
15,
),
SizedBox(
height: 20,
),
AppText(
TranslationBase.of(context)
.idNo,
fontSize: SizeConfig
.textMultiplier *
2,
fontWeight: FontWeight.bold,
)
],
), ),
AppText( )))),
TranslationBase.of(context) Expanded(
.idNo, child: InkWell(
fontSize: onTap: () => {
SizeConfig.textMultiplier * LoginType.loginType = 2,
Navigator.of(context)
.pushNamed(LOGIN_PAGE)
},
child: RoundedContainer(
borderColor: Colors.grey,
showBorder: true,
child: Padding(
padding: EdgeInsets.fromLTRB(
25, 10, 25, 10),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/my_file_white_icon.png',
height: SizeConfig
.imageSizeMultiplier *
12,
width: SizeConfig
.imageSizeMultiplier *
15,
),
SizedBox(
height: 20,
),
AppText(
TranslationBase.of(context)
.fileNo,
fontSize: SizeConfig
.textMultiplier *
2, 2,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
) )
], ],
), ),
)))), ))))
Expanded( ],
),
SizedBox(
height: 25,
),
Divider(
color: Colors.grey,
height: 2,
),
Center(
child: InkWell( child: InkWell(
onTap: () => { onTap: () => {
LoginType.loginType = 2,
Navigator.of(context) Navigator.of(context)
.pushNamed(LOGIN_PAGE) .pushNamed(FORGOT_PASSWORD)
}, },
child: RoundedContainer( child: AppText(
borderColor: Colors.grey, TranslationBase.of(context)
showBorder: true, .forgotPassword,
child: Padding( fontSize:
padding: EdgeInsets.fromLTRB( SizeConfig.textMultiplier * 2.5,
25, 10, 25, 10), marginTop: 20.0,
child: Column( underline: true)))
children: <Widget>[ ]),
Image.asset( ),
'assets/images/my_file_white_icon.png', Expanded(
height: SizeConfig flex: 1,
.imageSizeMultiplier * child: Column(
12, mainAxisAlignment: MainAxisAlignment.end,
width: SizeConfig
.imageSizeMultiplier *
15,
),
SizedBox(
height: 20,
),
AppText(
TranslationBase.of(context)
.fileNo,
fontSize:
SizeConfig.textMultiplier *
2,
fontWeight: FontWeight.bold,
)
],
),
))))
],
),
SizedBox(height: 25,),
Divider(
color: Colors.grey,
height: 2,
),
Center(
child: InkWell(
onTap: () => {
Navigator.of(context)
.pushNamed(FORGOT_PASSWORD)
},
child: AppText(
TranslationBase.of(context).forgotPassword,
fontSize: SizeConfig.textMultiplier * 2.5,
marginTop: 20.0,
underline: true)))
]),
),
Expanded(
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Divider(
color: Colors.grey,
height: 2,
),
SizedBox(height: 10,),
Row(
children: <Widget>[ children: <Widget>[
Divider(
Expanded( color: Colors.grey,
child: DefaultButton( height: 2,
TranslationBase.of(context).registerNow, ),
() => { SizedBox(
Navigator.of(context).pushNamed( height: 10,
REGISTER, ),
) Row(
}, children: <Widget>[
)), Expanded(
child: DefaultButton(
TranslationBase.of(context).registerNow,
() => {
Navigator.of(context).pushNamed(
REGISTER,
)
},
)),
],
),
], ],
), ))
], ],
)) ))));
],
)));
} }
} }

@ -153,18 +153,14 @@ class _Login extends State<Login> {
} }
void validateForm() { void validateForm() {
//TODO fix login if (util.validateIDBox(nationalIDorFile.text, loginType) == true &&
if (util.validateIDBox(nationalIDorFile.text, loginType) ==
true /*&&
mobileNo.length >= 9 */
&&
util.isSAUDIIDValid(nationalIDorFile.text, loginType) == true) { util.isSAUDIIDValid(nationalIDorFile.text, loginType) == true) {
setState(() { setState(() {
isButtonDisabled = false; isButtonDisabled = false;
}); });
} else { } else {
setState(() { setState(() {
isButtonDisabled = false; isButtonDisabled = true;
}); });
} }
} }

@ -81,11 +81,11 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
padding: EdgeInsets.symmetric(vertical: 5.0), padding: EdgeInsets.symmetric(vertical: 5.0),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
if(model.isLogin) if (model.isLogin)
Container( Container(
width: double.infinity, width: double.infinity,
height: 55, height: 55,
), ),
Row( Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
@ -112,29 +112,63 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
.myAppointmentsList, .myAppointmentsList,
hasBadge: true, hasBadge: true,
), ),
Positioned( projectViewModel.isArabic
right: 0.0, ? Positioned(
child: Badge( left: 0.0,
toAnimate: false, child: Badge(
position: toAnimate: false,
BadgePosition.topEnd(), shape:
shape: BadgeShape.circle, BadgeShape.circle,
badgeColor: Color(0xFF40ACC9) badgeColor: Color(
.withOpacity(1.0), 0xFF40ACC9)
borderRadius: .withOpacity(1.0),
BorderRadius.circular(8), borderRadius:
badgeContent: Container( BorderRadius
padding: .circular(8),
EdgeInsets.all(2.0), badgeContent: Container(
child: Text( padding:
appoCountProvider.count EdgeInsets.all(
.toString(), 2.0),
style: TextStyle( child: Text(
color: Colors.white, appoCountProvider
fontSize: 16.0)), .count
), .toString(),
), style: TextStyle(
), color: Colors
.white,
fontSize:
16.0)),
),
),
)
: Positioned(
right: 0.0,
child: Badge(
toAnimate: false,
shape:
BadgeShape.circle,
badgeColor: Color(
0xFF40ACC9)
.withOpacity(1.0),
borderRadius:
BorderRadius
.circular(8),
badgeContent: Container(
padding:
EdgeInsets.all(
2.0),
child: Text(
appoCountProvider
.count
.toString(),
style: TextStyle(
color: Colors
.white,
fontSize:
16.0)),
),
),
),
]) ])
: MedicalProfileItem( : MedicalProfileItem(
title: TranslationBase.of(context) title: TranslationBase.of(context)
@ -156,7 +190,8 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).lab, title: TranslationBase.of(context).lab,
imagePath: 'lab_result_icon.png', imagePath: 'lab_result_icon.png',
subTitle: TranslationBase.of(context).labSubtitle, subTitle: TranslationBase.of(context)
.labSubtitle,
), ),
), ),
), ),

@ -28,13 +28,24 @@ class RadiologyDetailsPage extends StatelessWidget {
baseViewModel: model, baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Text(
'${finalRadiology.reportData}',
textAlign: TextAlign.center,
),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Texts('${finalRadiology.reportData}',textAlign: TextAlign.start,fontSize: 17,), child: Texts(
'${finalRadiology.reportData}',
textAlign: TextAlign.start,
fontSize: 17,
),
), ),
SizedBox(height: MediaQuery.of(context).size.height * 0.2,) SizedBox(
height: MediaQuery.of(context).size.height * 0.2,
)
], ],
), ),
), ),
@ -43,6 +54,7 @@ class RadiologyDetailsPage extends StatelessWidget {
height: model.radImageURL.isNotEmpty ? MediaQuery.of(context).size.height * 0.2:MediaQuery.of(context).size.height * 0.15, height: model.radImageURL.isNotEmpty ? MediaQuery.of(context).size.height * 0.2:MediaQuery.of(context).size.height * 0.15,
color: Colors.grey[100], color: Colors.grey[100],
child: Column( child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
Divider(), Divider(),
if(model.radImageURL.isNotEmpty) if(model.radImageURL.isNotEmpty)

@ -9,9 +9,9 @@ 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:diplomaticquarterapp/uitl/app_toast.dart';
class ProfileSettings extends StatefulWidget { class ProfileSettings extends StatefulWidget {
@override @override
_ProfileSettings createState() => _ProfileSettings(); _ProfileSettings createState() => _ProfileSettings();
} }
@ -32,10 +32,10 @@ class _ProfileSettings extends State<ProfileSettings>
}); });
super.initState(); super.initState();
} }
Widget build(BuildContext context) {
Widget build(BuildContext context) {
return BaseView<DashboardViewModel>( return BaseView<DashboardViewModel>(
onModelReady: (model) =>{}, onModelReady: (model) => {},
builder: (_, model, wi) => Container( builder: (_, model, wi) => Container(
child: child:
ListView(scrollDirection: Axis.vertical, children: <Widget>[ ListView(scrollDirection: Axis.vertical, children: <Widget>[
@ -82,7 +82,6 @@ class _ProfileSettings extends State<ProfileSettings>
setState(() { setState(() {
language = value; language = value;
}); });
}, },
) )
], ],
@ -102,7 +101,6 @@ class _ProfileSettings extends State<ProfileSettings>
setState(() { setState(() {
language = value; language = value;
}); });
}, },
) )
], ],
@ -164,7 +162,7 @@ class _ProfileSettings extends State<ProfileSettings>
children: [ children: [
AppText(TranslationBase.of(context).email), AppText(TranslationBase.of(context).email),
TextField( TextField(
controller: emailController, controller: emailController,
decoration: InputDecoration( decoration: InputDecoration(
suffixIcon: Icon(Icons.edit), suffixIcon: Icon(Icons.edit),
)) ))
@ -179,7 +177,7 @@ class _ProfileSettings extends State<ProfileSettings>
children: [ children: [
AppText(TranslationBase.of(context).emergencyName), AppText(TranslationBase.of(context).emergencyName),
TextField( TextField(
controller: emergencyContactName, controller: emergencyContactName,
decoration: InputDecoration( decoration: InputDecoration(
suffixIcon: Icon(Icons.edit), suffixIcon: Icon(Icons.edit),
)) ))
@ -209,7 +207,7 @@ class _ProfileSettings extends State<ProfileSettings>
child: DefaultButton( child: DefaultButton(
TranslationBase.of(context).submit, TranslationBase.of(context).submit,
() { () {
saveSettings(); saveSettings();
}, },
)), )),
], ],
@ -217,14 +215,15 @@ class _ProfileSettings extends State<ProfileSettings>
]))); ])));
} }
getSettings(context){ getSettings(context) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
authService.getSettings().then((result)=>{ authService.getSettings().then((result) => {
GifLoaderDialogUtils.hideDialog(context), GifLoaderDialogUtils.hideDialog(context),
setValue(result["PateintInfoForUpdateList"][0]) setValue(result["PateintInfoForUpdateList"][0])
}); });
} }
setValue(value){
setValue(value) {
setState(() { setState(() {
this.language = int.parse(value["PreferredLanguage"]); this.language = int.parse(value["PreferredLanguage"]);
this.emailAlert = value["IsEmailAlertRequired"]; this.emailAlert = value["IsEmailAlertRequired"];
@ -233,20 +232,21 @@ class _ProfileSettings extends State<ProfileSettings>
this.emergencyContact.text = value["EmergencyContactNo"]; this.emergencyContact.text = value["EmergencyContactNo"];
this.emergencyContactName.text = value["EmergencyContactName"]; this.emergencyContactName.text = value["EmergencyContactName"];
}); });
} }
saveSettings(){
saveSettings() {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
Map<String, dynamic> request = {}; Map<String, dynamic> request = {};
request["EmailAddress"] =this.emailController.text; request["EmailAddress"] = this.emailController.text;
request["EmergencyContactName"] = this.emergencyContactName.text; request["EmergencyContactName"] = this.emergencyContactName.text;
request["EmergencyContactNo"] = this.emergencyContact.text; request["EmergencyContactNo"] = this.emergencyContact.text;
request["IsEmailAlertRequired"] = this.emailAlert; request["IsEmailAlertRequired"] = this.emailAlert;
request["IsSMSAlertRequired"] = this.smsAlert; request["IsSMSAlertRequired"] = this.smsAlert;
request["PreferredLanguage"] = this.language.toString(); request["PreferredLanguage"] = this.language.toString();
authService.saveSettings(request).then((result)=>{ authService.saveSettings(request).then((result) => {
print(result), AppToast.showSuccessToast(
GifLoaderDialogUtils.hideDialog(context) message: TranslationBase.of(context).profileUpdate),
}); GifLoaderDialogUtils.hideDialog(context)
});
} }
} }

@ -173,15 +173,19 @@ class AuthProvider with ChangeNotifier {
request.generalid = GENERAL_ID; request.generalid = GENERAL_ID;
request.languageID = LANGUAGE_ID; request.languageID = LANGUAGE_ID;
request.patientOutSA = request.zipCode == '966' ? 0 : 1; request.patientOutSA = request.zipCode == '966' ? 0 : 1;
try {
dynamic localRes; dynamic localRes;
await new BaseAppClient().post(CHECK_PATIENT_AUTH, await new BaseAppClient().post(CHECK_PATIENT_AUTH,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error;
}, body: request.toJson());
return Future.value(localRes);
} catch (error) {
throw error; throw error;
}, body: request.toJson()); //throw error;
return Future.value(localRes); }
} }
Future<dynamic> getLoginInfo(request) async { Future<dynamic> getLoginInfo(request) async {

@ -148,7 +148,7 @@ class TranslationBase {
String get idNo => localizedValues['national-id'][locale.languageCode]; String get idNo => localizedValues['national-id'][locale.languageCode];
String get fileNo => localizedValues['fileNo'][locale.languageCode]; String get fileNo => localizedValues['fileNo'][locale.languageCode];
String get fileno => localizedValues['fileno'][locale.languageCode]; String get fileno => localizedValues['fileno'][locale.languageCode];
String get forgotPassword => String get forgotPassword =>
localizedValues['forgotFileNo'][locale.languageCode]; localizedValues['forgotFileNo'][locale.languageCode];
@ -791,7 +791,8 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get modes => localizedValues['modes'][locale.languageCode]; String get modes => localizedValues['modes'][locale.languageCode];
String get vibration => localizedValues['vibration'][locale.languageCode]; String get vibration => localizedValues['vibration'][locale.languageCode];
String get blindMode => localizedValues['blind-modes'][locale.languageCode]; String get blindMode => localizedValues['blind-modes'][locale.languageCode];
String get invertTheme => localizedValues['invert-theme'][locale.languageCode]; String get invertTheme =>
localizedValues['invert-theme'][locale.languageCode];
String get offTheme => localizedValues['off-theme'][locale.languageCode]; String get offTheme => localizedValues['off-theme'][locale.languageCode];
String get dimTheme => localizedValues['dim-theme'][locale.languageCode]; String get dimTheme => localizedValues['dim-theme'][locale.languageCode];
String get bwTheme => localizedValues['bw-theme'][locale.languageCode]; String get bwTheme => localizedValues['bw-theme'][locale.languageCode];
@ -805,8 +806,7 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
localizedValues['accessibility'][locale.languageCode]; localizedValues['accessibility'][locale.languageCode];
String get selectClinic => String get selectClinic =>
localizedValues['selectClinic'][locale.languageCode]; localizedValues['selectClinic'][locale.languageCode];
String get reviews => String get reviews => localizedValues['reviews'][locale.languageCode];
localizedValues['reviews'][locale.languageCode];
String get orderStatus => localizedValues['orderStatus'][locale.languageCode]; String get orderStatus => localizedValues['orderStatus'][locale.languageCode];
String get cancelOrder => localizedValues['CancelOrder'][locale.languageCode]; String get cancelOrder => localizedValues['CancelOrder'][locale.languageCode];
@ -814,9 +814,12 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get feedback => localizedValues['Feedback'][locale.languageCode]; String get feedback => localizedValues['Feedback'][locale.languageCode];
String get liveChat => localizedValues['LiveChat'][locale.languageCode]; String get liveChat => localizedValues['LiveChat'][locale.languageCode];
String get service => localizedValues['Service'][locale.languageCode]; String get service => localizedValues['Service'][locale.languageCode];
String get hMGServiceLabel => localizedValues['HMGServiceLabel'][locale.languageCode]; String get hMGServiceLabel =>
String get healthWeatherIndicators => localizedValues['HealthWeatherIndicators'][locale.languageCode]; localizedValues['HMGServiceLabel'][locale.languageCode];
String get healthTipsBasedOnCurrentWeather => localizedValues['HealthTipsBasedOnCurrentWeather'][locale.languageCode]; String get healthWeatherIndicators =>
localizedValues['HealthWeatherIndicators'][locale.languageCode];
String get healthTipsBasedOnCurrentWeather =>
localizedValues['HealthTipsBasedOnCurrentWeather'][locale.languageCode];
String get moreDetails => localizedValues['MoreDetails'][locale.languageCode]; String get moreDetails => localizedValues['MoreDetails'][locale.languageCode];
String get sendCopy => localizedValues['SendCopy'][locale.languageCode]; String get sendCopy => localizedValues['SendCopy'][locale.languageCode];
String get resendOrder => localizedValues['ResendOrder'][locale.languageCode]; String get resendOrder => localizedValues['ResendOrder'][locale.languageCode];
@ -830,7 +833,8 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get mass => localizedValues['mass'][locale.languageCode]; String get mass => localizedValues['mass'][locale.languageCode];
String get tempC => localizedValues['temp-c'][locale.languageCode]; String get tempC => localizedValues['temp-c'][locale.languageCode];
String get bpm => localizedValues['bpm'][locale.languageCode]; String get bpm => localizedValues['bpm'][locale.languageCode];
String get respirationSigns => localizedValues['respiration-signs'][locale.languageCode]; String get respirationSigns =>
localizedValues['respiration-signs'][locale.languageCode];
String get sysDias => localizedValues['sys-dias'][locale.languageCode]; String get sysDias => localizedValues['sys-dias'][locale.languageCode];
String get body => localizedValues['body'][locale.languageCode]; String get body => localizedValues['body'][locale.languageCode];
String get feedbackTitle => localizedValues['feedback'][locale.languageCode]; String get feedbackTitle => localizedValues['feedback'][locale.languageCode];
@ -839,26 +843,39 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get likeToHear => localizedValues['like-to-hear'][locale.languageCode]; String get likeToHear => localizedValues['like-to-hear'][locale.languageCode];
String get subject => localizedValues['subject'][locale.languageCode]; String get subject => localizedValues['subject'][locale.languageCode];
String get message => localizedValues['message'][locale.languageCode]; String get message => localizedValues['message'][locale.languageCode];
String get emptySubject => localizedValues['empty-subject'][locale.languageCode]; String get emptySubject =>
String get emptyMessage => localizedValues['empty-message'][locale.languageCode]; localizedValues['empty-subject'][locale.languageCode];
String get selectAttachment => localizedValues['select-attachment'][locale.languageCode]; String get emptyMessage =>
String get complainAppo => localizedValues['complain-appo'][locale.languageCode]; localizedValues['empty-message'][locale.languageCode];
String get complainWithoutAppo => localizedValues['complain-without-appo'][locale.languageCode]; String get selectAttachment =>
localizedValues['select-attachment'][locale.languageCode];
String get complainAppo =>
localizedValues['complain-appo'][locale.languageCode];
String get complainWithoutAppo =>
localizedValues['complain-without-appo'][locale.languageCode];
String get question => localizedValues['question'][locale.languageCode]; String get question => localizedValues['question'][locale.languageCode];
String get messageType => localizedValues['message-type'][locale.languageCode]; String get messageType =>
localizedValues['message-type'][locale.languageCode];
String get compliment => localizedValues['compliment'][locale.languageCode]; String get compliment => localizedValues['compliment'][locale.languageCode];
String get suggestion => localizedValues['suggestion'][locale.languageCode]; String get suggestion => localizedValues['suggestion'][locale.languageCode];
String get yourFeedback => localizedValues['your-feedback'][locale.languageCode]; String get yourFeedback =>
localizedValues['your-feedback'][locale.languageCode];
String get selectPart => localizedValues['select-part'][locale.languageCode]; String get selectPart => localizedValues['select-part'][locale.languageCode];
String get number => localizedValues['number'][locale.languageCode]; String get number => localizedValues['number'][locale.languageCode];
String get notClassified => localizedValues['not-classified'][locale.languageCode]; String get notClassified =>
String get searchItemError => localizedValues['searchItemError'][locale.languageCode]; localizedValues['not-classified'][locale.languageCode];
String get searchItemError =>
localizedValues['searchItemError'][locale.languageCode];
String get youCanFind => localizedValues['YouCanFind'][locale.languageCode]; String get youCanFind => localizedValues['YouCanFind'][locale.languageCode];
String get itemInSearch => localizedValues['ItemInSearch'][locale.languageCode]; String get itemInSearch =>
localizedValues['ItemInSearch'][locale.languageCode];
String get invoiceNo => localizedValues['InvoiceNo'][locale.languageCode]; String get invoiceNo => localizedValues['InvoiceNo'][locale.languageCode];
String get specialResult => localizedValues['SpecialResult'][locale.languageCode]; String get specialResult =>
String get generalResult => localizedValues['GeneralResult'][locale.languageCode]; localizedValues['SpecialResult'][locale.languageCode];
String get showMoreBtn => localizedValues['show-more-btn'][locale.languageCode]; String get generalResult =>
localizedValues['GeneralResult'][locale.languageCode];
String get showMoreBtn =>
localizedValues['show-more-btn'][locale.languageCode];
String get value => localizedValues['value'][locale.languageCode]; String get value => localizedValues['value'][locale.languageCode];
String get range => localizedValues['range'][locale.languageCode]; String get range => localizedValues['range'][locale.languageCode];
String get outpatient => localizedValues['out-patient'][locale.languageCode]; String get outpatient => localizedValues['out-patient'][locale.languageCode];
@ -868,71 +885,102 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get sendCopyRad => localizedValues['send-copy'][locale.languageCode]; String get sendCopyRad => localizedValues['send-copy'][locale.languageCode];
String get appoSurvey => localizedValues['appoSurvey'][locale.languageCode]; String get appoSurvey => localizedValues['appoSurvey'][locale.languageCode];
String get labResults => localizedValues['labResults'][locale.languageCode]; String get labResults => localizedValues['labResults'][locale.languageCode];
String get doctorRating => localizedValues['doctorRating'][locale.languageCode]; String get doctorRating =>
localizedValues['doctorRating'][locale.languageCode];
String get good => localizedValues['good'][locale.languageCode]; String get good => localizedValues['good'][locale.languageCode];
String get v_good => localizedValues['v-good'][locale.languageCode]; String get v_good => localizedValues['v-good'][locale.languageCode];
String get excellent => localizedValues['excellent'][locale.languageCode]; String get excellent => localizedValues['excellent'][locale.languageCode];
String get below_average => localizedValues['below-average'][locale.languageCode]; String get below_average =>
localizedValues['below-average'][locale.languageCode];
String get infoSigns => localizedValues['info-signs'][locale.languageCode]; String get infoSigns => localizedValues['info-signs'][locale.languageCode];
String get infoAdvancePayment => localizedValues['info-advance-payment'][locale.languageCode]; String get infoAdvancePayment =>
String get infoMyBalance => localizedValues['info-my-balance'][locale.languageCode]; localizedValues['info-advance-payment'][locale.languageCode];
String get infoMyBalance =>
localizedValues['info-my-balance'][locale.languageCode];
String get erContant => localizedValues['er-contant'][locale.languageCode]; String get erContant => localizedValues['er-contant'][locale.languageCode];
String get er => localizedValues['er'][locale.languageCode]; String get er => localizedValues['er'][locale.languageCode];
String get transportationService => localizedValues['transportation-Service'][locale.languageCode]; String get transportationService =>
String get infoAmbulance => localizedValues['info-ambulance'][locale.languageCode]; localizedValues['transportation-Service'][locale.languageCode];
String get transportHeading => localizedValues['RRT-transport-heading'][locale.languageCode]; String get infoAmbulance =>
localizedValues['info-ambulance'][locale.languageCode];
String get transportHeading =>
localizedValues['RRT-transport-heading'][locale.languageCode];
String get sar => localizedValues['sar'][locale.languageCode]; String get sar => localizedValues['sar'][locale.languageCode];
String get directionHeading => localizedValues['RRT-direction-heading'][locale.languageCode]; String get directionHeading =>
localizedValues['RRT-direction-heading'][locale.languageCode];
String get toHospital => localizedValues['to-hospital'][locale.languageCode]; String get toHospital => localizedValues['to-hospital'][locale.languageCode];
String get fromHospital => localizedValues['from-hospital'][locale.languageCode]; String get fromHospital =>
localizedValues['from-hospital'][locale.languageCode];
String get oneDirec => localizedValues['one-direc'][locale.languageCode]; String get oneDirec => localizedValues['one-direc'][locale.languageCode];
String get twoDirec => localizedValues['two-direc'][locale.languageCode]; String get twoDirec => localizedValues['two-direc'][locale.languageCode];
String get pickupLocation => localizedValues['pickup-location'][locale.languageCode]; String get pickupLocation =>
localizedValues['pickup-location'][locale.languageCode];
String get pickupSpot => localizedValues['pickup-spot'][locale.languageCode]; String get pickupSpot => localizedValues['pickup-spot'][locale.languageCode];
String get insideHome => localizedValues['inside-home'][locale.languageCode]; String get insideHome => localizedValues['inside-home'][locale.languageCode];
String get haveAppo => localizedValues['have-appo'][locale.languageCode]; String get haveAppo => localizedValues['have-appo'][locale.languageCode];
String get dropoffLocation => localizedValues['dropoff-location'][locale.languageCode]; String get dropoffLocation =>
localizedValues['dropoff-location'][locale.languageCode];
String get selectAll => localizedValues['select-all'][locale.languageCode]; String get selectAll => localizedValues['select-all'][locale.languageCode];
String get selectMap => localizedValues['select-map'][locale.languageCode]; String get selectMap => localizedValues['select-map'][locale.languageCode];
String get noAppointment => localizedValues['no-appointment'][locale.languageCode]; String get noAppointment =>
String get patientShareB => localizedValues['patient-share'][locale.languageCode]; localizedValues['no-appointment'][locale.languageCode];
String get patientShareTax => localizedValues['patient-share-tax'][locale.languageCode]; String get patientShareB =>
String get patientShareTotal => localizedValues['patient-share-total'][locale.languageCode]; localizedValues['patient-share'][locale.languageCode];
String get selectAmbulate => localizedValues['select-ambulate'][locale.languageCode]; String get patientShareTax =>
localizedValues['patient-share-tax'][locale.languageCode];
String get patientShareTotal =>
localizedValues['patient-share-total'][locale.languageCode];
String get selectAmbulate =>
localizedValues['select-ambulate'][locale.languageCode];
String get wheelchair => localizedValues['wheelchair'][locale.languageCode]; String get wheelchair => localizedValues['wheelchair'][locale.languageCode];
String get walker => localizedValues['walker"'][locale.languageCode]; String get walker => localizedValues['walker"'][locale.languageCode];
String get stretcher => localizedValues['stretcher'][locale.languageCode]; String get stretcher => localizedValues['stretcher'][locale.languageCode];
String get none => localizedValues['none'][locale.languageCode]; String get none => localizedValues['none'][locale.languageCode];
String get RRTSummary => localizedValues['RRT-Summary'][locale.languageCode]; String get RRTSummary => localizedValues['RRT-Summary'][locale.languageCode];
String get billAmount => localizedValues['bill-amount'][locale.languageCode]; String get billAmount => localizedValues['bill-amount'][locale.languageCode];
String get transportMethod => localizedValues['transport-method'][locale.languageCode]; String get transportMethod =>
localizedValues['transport-method'][locale.languageCode];
String get directions => localizedValues['directions'][locale.languageCode]; String get directions => localizedValues['directions'][locale.languageCode];
String get infoMyAppointments => localizedValues['info-my-appointments'][locale.languageCode]; String get infoMyAppointments =>
localizedValues['info-my-appointments'][locale.languageCode];
String get infoTodo => localizedValues['info-todo'][locale.languageCode]; String get infoTodo => localizedValues['info-todo'][locale.languageCode];
String get familyInfo => localizedValues['family-info'][locale.languageCode]; String get familyInfo => localizedValues['family-info'][locale.languageCode];
String get dentalComplaints => localizedValues['dental-complains'][locale.languageCode]; String get profileUpdate =>
String get emptyResult => localizedValues['empty-result'][locale.languageCode]; localizedValues['update-succ'][locale.languageCode];
String get dentalComplaints =>
String get noBookedAppo => localizedValues['no-booked-appointment'][locale.languageCode]; localizedValues['dental-complains'][locale.languageCode];
String get noConfirmedAppo => localizedValues['no-confirmed-appointment'][locale.languageCode]; String get emptyResult =>
String get noArrivedAppo => localizedValues['no-arrived-appointment'][locale.languageCode]; localizedValues['empty-result'][locale.languageCode];
String get upcomingEmpty => localizedValues['upcoming-empty'][locale.languageCode];
String get upcomingTimeLeft => localizedValues['upcoming-timeLeft'][locale.languageCode]; String get noBookedAppo =>
localizedValues['no-booked-appointment'][locale.languageCode];
String get covidTestAllServices => localizedValues['covid-test-all-services'][locale.languageCode]; String get noConfirmedAppo =>
localizedValues['no-confirmed-appointment'][locale.languageCode];
String get noArrivedAppo =>
localizedValues['no-arrived-appointment'][locale.languageCode];
String get upcomingEmpty =>
localizedValues['upcoming-empty'][locale.languageCode];
String get upcomingTimeLeft =>
localizedValues['upcoming-timeLeft'][locale.languageCode];
String get covidTestAllServices =>
localizedValues['covid-test-all-services'][locale.languageCode];
String get pharmacy => localizedValues['pharmacy'][locale.languageCode]; String get pharmacy => localizedValues['pharmacy'][locale.languageCode];
String get ereferral => localizedValues['ereferral'][locale.languageCode]; String get ereferral => localizedValues['ereferral'][locale.languageCode];
String get childVaccine => localizedValues['child-vaccine'][locale.languageCode]; String get childVaccine =>
localizedValues['child-vaccine'][locale.languageCode];
String get calculators => localizedValues['calculators'][locale.languageCode]; String get calculators => localizedValues['calculators'][locale.languageCode];
String get converters => localizedValues['converters'][locale.languageCode]; String get converters => localizedValues['converters'][locale.languageCode];
String get h2o => localizedValues['h2o'][locale.languageCode]; String get h2o => localizedValues['h2o'][locale.languageCode];
String get vTour => localizedValues['v-tour'][locale.languageCode]; String get vTour => localizedValues['v-tour'][locale.languageCode];
String get hmgNews => localizedValues['hmg-news'][locale.languageCode]; String get hmgNews => localizedValues['hmg-news'][locale.languageCode];
String get bloodD => localizedValues['blood-d'][locale.languageCode]; String get bloodD => localizedValues['blood-d'][locale.languageCode];
String get symptomCheckerTitle => localizedValues['symptomCheckerTitle'][locale.languageCode]; String get symptomCheckerTitle =>
localizedValues['symptomCheckerTitle'][locale.languageCode];
String get latestNews => localizedValues['latest-news'][locale.languageCode]; String get latestNews => localizedValues['latest-news'][locale.languageCode];
String get ourLocation => localizedValues['our-location'][locale.languageCode]; String get ourLocation =>
localizedValues['our-location'][locale.languageCode];
String get pharmacies => localizedValues['pharmacies'][locale.languageCode]; String get pharmacies => localizedValues['pharmacies'][locale.languageCode];
String get hospitals => localizedValues['hospitals'][locale.languageCode]; String get hospitals => localizedValues['hospitals'][locale.languageCode];
String get wallet => localizedValues['wallet'][locale.languageCode]; String get wallet => localizedValues['wallet'][locale.languageCode];
@ -941,11 +989,14 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get ready => localizedValues['ready'][locale.languageCode]; String get ready => localizedValues['ready'][locale.languageCode];
String get completed => localizedValues['completed'][locale.languageCode]; String get completed => localizedValues['completed'][locale.languageCode];
String get cancelled => localizedValues['cancelled'][locale.languageCode]; String get cancelled => localizedValues['cancelled'][locale.languageCode];
String get requestMedicalReport => localizedValues['request-medical-report'][locale.languageCode]; String get requestMedicalReport =>
localizedValues['request-medical-report'][locale.languageCode];
String get insurCards => localizedValues['insur-cards'][locale.languageCode]; String get insurCards => localizedValues['insur-cards'][locale.languageCode];
String get labResult => localizedValues['labResult'][locale.languageCode]; String get labResult => localizedValues['labResult'][locale.languageCode];
String get details => localizedValues['details'][locale.languageCode]; String get details => localizedValues['details'][locale.languageCode];
String get activeInsurence => localizedValues['active-insurence'][locale.languageCode]; String get age => localizedValues['age'][locale.languageCode];
String get activeInsurence =>
localizedValues['active-insurence'][locale.languageCode];
String get notActive => localizedValues['not-active'][locale.languageCode]; String get notActive => localizedValues['not-active'][locale.languageCode];
String get cardDetail => localizedValues['card-detail'][locale.languageCode]; String get cardDetail => localizedValues['card-detail'][locale.languageCode];
String get dr => localizedValues['Dr'][locale.languageCode]; String get dr => localizedValues['Dr'][locale.languageCode];

@ -40,19 +40,15 @@ class _AppDrawerState extends State<AppDrawer> {
var familyFileProvider = FamilyFilesProvider(); var familyFileProvider = FamilyFilesProvider();
AuthenticatedUser user; AuthenticatedUser user;
AuthenticatedUser mainUser; AuthenticatedUser mainUser;
AuthenticatedUserObject authenticatedUserObject = locator< AuthenticatedUserObject authenticatedUserObject =
AuthenticatedUserObject>(); locator<AuthenticatedUserObject>();
VitalSignService _vitalSignService = locator<VitalSignService>(); VitalSignService _vitalSignService = locator<VitalSignService>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectProvider = Provider.of(context); projectProvider = Provider.of(context);
return SizedBox( return SizedBox(
width: MediaQuery width: MediaQuery.of(context).size.width * 0.75,
.of(context)
.size
.width * 0.75,
child: Container( child: Container(
color: Colors.white, color: Colors.white,
child: Drawer( child: Drawer(
@ -64,359 +60,329 @@ class _AppDrawerState extends State<AppDrawer> {
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
children: <Widget>[ children: <Widget>[
Container( Container(
height: SizeConfig.screenHeight * .30, height: SizeConfig.screenHeight * .27,
padding: EdgeInsets.all(15),
child: InkWell( child: InkWell(
child: DrawerHeader( child: Column(
child: Column( children: <Widget>[
children: <Widget>[ Container(
Container( child:
child: Image.asset('assets/images/DQ/DQ_logo.png'),
Image.asset('assets/images/DQ/DQ_logo.png'), margin: EdgeInsets.all(
margin: EdgeInsets.all( SizeConfig.imageSizeMultiplier * 4),
SizeConfig.imageSizeMultiplier * 4), ),
), (user != null && projectProvider.isLogin)
(user != null && projectProvider.isLogin) ? Padding(
? Padding( padding: EdgeInsets.all(10),
padding: EdgeInsets.all(15), child: Column(
child: Column( mainAxisAlignment:
mainAxisAlignment: MainAxisAlignment.start,
MainAxisAlignment.start, children: <Widget>[
children: <Widget>[ Row(
Row( children: <Widget>[
children: <Widget>[ Padding(
padding:
EdgeInsets.only(right: 5),
child: Icon(
Icons.account_circle,
color: Color(0xFF40ACC9),
)),
AppText(
user.firstName +
' ' +
user.lastName,
color: Color(0xFF40ACC9),
)
],
),
Row(children: <Widget>[
Padding( Padding(
padding: EdgeInsets.only( padding:
right: 5), EdgeInsets.only(left: 30),
child: Icon( child: Column(
Icons.account_circle, children: <Widget>[
color: Color(0xFF40ACC9), AppText(
)), TranslationBase.of(
AppText( context)
user.firstName + .fileno +
' ' + ": " +
user.lastName, user.patientID
color: Color(0xFF40ACC9), .toString(),
) color: Color(0xFF40ACC9),
], fontSize: SizeConfig
), .textMultiplier *
Row(children: <Widget>[ 1.5,
Padding( ),
padding: EdgeInsets.only( AppText(
left: 30, top: 5), user.bloodGroup != null
child: Column( ? 'Blood Group: ' +
children: <Widget>[ user.bloodGroup
AppText( : '',
TranslationBase fontSize: SizeConfig
.of( .textMultiplier *
context) 1.5,
.fileno + ),
": " + ],
user.patientID ))
.toString(), ])
color: ]))
Color(0xFF40ACC9), : SizedBox(),
fontSize: SizeConfig ],
.textMultiplier *
1.5,
),
AppText(
user.bloodGroup != null
? 'Blood Group: ' +
user.bloodGroup
: '',
fontSize: SizeConfig
.textMultiplier *
1.5,
),
],
))
])
]))
: SizedBox(),
],
),
), ),
), ),
), ),
Column( Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
InkWell(
child: DrawerItem(
TranslationBase
.of(context)
.arabicChange,
Icons.translate),
onTap: () {
// Navigator.of(context).pushNamed(
// WELCOME_LOGIN,
// );
if (projectProvider.isArabic) {
projectProvider.changeLanguage('en');
} else {
projectProvider.changeLanguage('ar');
}
},
),
(user != null && projectProvider.isLogin) (user != null && projectProvider.isLogin)
? Column( ? Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
user.isFamily == null || user.isFamily == false user.isFamily == null ||
? InkWell( user.isFamily == false
child: DrawerItem( ? InkWell(
TranslationBase child: DrawerItem(
.of(context) TranslationBase.of(context).family,
.family, Icons.group,
Icons.group, textColor: Color(0xFF40ACC9),
textColor: Color(0xFF40ACC9), iconColor: Color(0xFF40ACC9),
iconColor: Color(0xFF40ACC9), bottomLine: false,
bottomLine: false, sideArrow: true,
sideArrow: true, ),
), onTap: () {
onTap: () { Navigator.of(context).pushNamed(
Navigator.of(context).pushNamed( MY_FAMILIY,
MY_FAMILIY, );
); },
}, )
) : SizedBox(),
: SizedBox(), FutureBuilder(
FutureBuilder( future: getFamilyFiles(), // async work
future: getFamilyFiles(), // async work builder: (BuildContext context,
builder: (BuildContext context, AsyncSnapshot<
AsyncSnapshot< GetAllSharedRecordsByStatusResponse>
GetAllSharedRecordsByStatusResponse> snapshot) {
snapshot) { switch (snapshot.connectionState) {
switch (snapshot.connectionState) { case ConnectionState.waiting:
case ConnectionState.waiting: return Padding(
return Padding( padding: EdgeInsets.all(10),
padding: EdgeInsets.all(10), child: Text('Loading....'));
child: Text('Loading....')); default:
default: if (snapshot.hasError)
if (snapshot.hasError) return Padding(
return Padding( padding: EdgeInsets.all(10),
padding: EdgeInsets.all(10), child: Text(snapshot.error));
child: Text(snapshot.error)); else
else return Container(
return Container( decoration: BoxDecoration(
decoration: BoxDecoration( border: Border(
border: Border( bottom: BorderSide(
bottom: BorderSide( // <--- left side
// <--- left side color: Colors.grey[200],
color: Colors.grey[200], width: 1.0,
width: 1.0, ),
), )),
)), child: Column(
child: Column( children: [
children: [ user.isFamily == true
user.isFamily == true ? Container(
? Container( padding:
padding: EdgeInsets.only(
EdgeInsets.only( bottom: 5),
bottom: 5),
child: InkWell(
onTap: () {
switchUser(
mainUser,
context);
},
child: Row(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <
Widget>[
Expanded(
child: Icon(
Icons
.person),
),
Expanded(
flex: 7,
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <
Widget>[
AppText(
mainUser
.firstName +
' ' +
mainUser
.lastName),
AppText(
TranslationBase
.of(
context)
.fileno +
": " +
mainUser
.patientID
.toString()),
])),
],
)))
: SizedBox(),
Column(
mainAxisAlignment:
MainAxisAlignment
.start,
mainAxisSize:
MainAxisSize.min,
children: snapshot.data
.getAllSharedRecordsByStatusList
.map<Widget>(
(result) {
return result
.status ==
3
? Container(
padding: EdgeInsets
.only(
bottom:
5),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
switchUser( switchUser(
result, mainUser,
context); context);
}, },
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment CrossAxisAlignment
.start, .start,
children: < children: <
Widget>[ Widget>[
Expanded( Expanded(
child: child: Icon(
Icon(Icons Icons
.person, .person),
color: result
.responseID ==
user
.patientID
? Color(
0xFF40ACC9)
: Colors
.black),
), ),
Expanded( Expanded(
flex: 7, flex: 7,
child: Padding( child: Column(
padding: EdgeInsets crossAxisAlignment:
.only( CrossAxisAlignment.start,
left: 5, children: <Widget>[
right: 5), AppText(mainUser.firstName + ' ' + mainUser.lastName),
child: Column( AppText(TranslationBase.of(context).fileno + ": " + mainUser.patientID.toString()),
crossAxisAlignment: CrossAxisAlignment ])),
.start,
children: <
Widget>[
AppText(
result
.patientName,
color: result
.responseID ==
user
.patientID
? Color(
0xFF40ACC9)
: Colors
.black),
AppText(
TranslationBase
.of(
context)
.fileno +
": " +
result
.iD
.toString(),
color: result
.responseID ==
user
.patientID
? Color(
0xFF40ACC9)
: Colors
.black),
]))),
], ],
))) )))
: SizedBox(); : SizedBox(),
}).toList()) Column(
], mainAxisAlignment:
)); MainAxisAlignment
} .start,
}, mainAxisSize:
), MainAxisSize.min,
InkWell( children: snapshot.data
child: DrawerItem( .getAllSharedRecordsByStatusList
TranslationBase .map<Widget>(
.of(context) (result) {
.notification, return result
Icons.notifications), .status ==
onTap: () { 3
//NotificationsPage ? Container(
Navigator.of(context).pop(); padding: EdgeInsets
Navigator.push( .only(
context, bottom:
MaterialPageRoute( 5),
builder: (BuildContext context) => child: InkWell(
NotificationsPage())); onTap: () {
}, switchUser(
), result,
InkWell( context);
child: DrawerItem( },
TranslationBase child: Row(
.of(context) crossAxisAlignment:
.appsetting, CrossAxisAlignment.start,
Icons.settings_input_composite), children: <
onTap: () { Widget>[
Navigator.of(context).pushNamed( Expanded(
SETTINGS, child:
); Icon(Icons.person, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
}, ),
), Expanded(
InkWell( flex: 7,
child: DrawerItem( child: Padding(
TranslationBase padding: EdgeInsets.only(left: 5, right: 5),
.of(context) child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
.rateApp, AppText(result.patientName, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
Icons.star), AppText(TranslationBase.of(context).fileno + ": " + result.iD.toString(), color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
onTap: () { ]))),
if (Platform.isIOS) { ],
launch( )))
"https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978"); : SizedBox();
} else { }).toList())
launch( ],
"https://play.google.com/store/apps/details?id=com.ejada.hmg&hl=en"); ));
} }
}, },
), ),
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
TranslationBase TranslationBase.of(context)
.of(context) .arabicChange,
.logout, Icons.translate),
Icons.lock_open), onTap: () {
onTap: () { if (projectProvider.isArabic) {
logout(); projectProvider.changeLanguage('en');
}, } else {
) projectProvider.changeLanguage('ar');
], }
) },
: InkWell( ),
child: DrawerItem( InkWell(
TranslationBase child: DrawerItem(
.of(context) TranslationBase.of(context)
.loginregister, .notification,
Icons.lock_open), Icons.notifications),
onTap: () { onTap: () {
login(); //NotificationsPage
}, Navigator.of(context).pop();
), Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) =>
NotificationsPage()));
},
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).appsetting,
Icons.settings_input_composite),
onTap: () {
Navigator.of(context).pushNamed(
SETTINGS,
);
},
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).rateApp,
Icons.star),
onTap: () {
if (Platform.isIOS) {
launch(
"https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978");
} else {
launch(
"https://play.google.com/store/apps/details?id=com.ejada.hmg&hl=en");
}
},
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).logout,
Icons.lock_open),
onTap: () {
logout();
},
)
],
)
: Column(
children: [
InkWell(
child: DrawerItem(
TranslationBase.of(context)
.loginregister,
Icons.lock_open),
onTap: () {
login();
},
),
SizedBox(
height: 120,
),
InkWell(
child: DrawerItem(
TranslationBase.of(context)
.arabicChange,
Icons.translate),
onTap: () {
if (projectProvider.isArabic) {
projectProvider.changeLanguage('en');
} else {
projectProvider.changeLanguage('ar');
}
},
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).appsetting,
Icons.settings_input_composite),
onTap: () {
Navigator.of(context).pushNamed(
SETTINGS,
);
},
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).rateApp,
Icons.star),
onTap: () {
if (Platform.isIOS) {
launch(
"https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978");
} else {
launch(
"https://play.google.com/store/apps/details?id=com.ejada.hmg&hl=en");
}
},
)
],
)
], ],
) )
], ],
@ -435,9 +401,7 @@ class _AppDrawerState extends State<AppDrawer> {
children: [ children: [
Column( Column(
children: <Widget>[ children: <Widget>[
Text(TranslationBase Text(TranslationBase.of(context).poweredBy),
.of(context)
.poweredBy),
Image.asset( Image.asset(
'assets/images/cs_logo_container.png', 'assets/images/cs_logo_container.png',
width: SizeConfig.imageSizeMultiplier * 30, width: SizeConfig.imageSizeMultiplier * 30,
@ -526,12 +490,11 @@ class _AppDrawerState extends State<AppDrawer> {
this this
.familyFileProvider .familyFileProvider
.silentLoggin(user is AuthenticatedUser ? null : user, .silentLoggin(user is AuthenticatedUser ? null : user,
mainUser: user is AuthenticatedUser) mainUser: user is AuthenticatedUser)
.then((value) { .then((value) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
loginAfter(value, context); loginAfter(value, context);
}) }).catchError((err) {
.catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);

@ -826,13 +826,13 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
speak() async { speak() async {
if (_currentLocaleId == 'en' && results['ReturnMessage'] != null) { if (_currentLocaleId == 'en' && results['ReturnMessage'] != null) {
await flutterTts.setVoice("en-us-x-sfg#male_2-local"); //await flutterTts.setVoice("en-us-x-sfg#male_2-local");
await flutterTts.setLanguage("en-US"); await flutterTts.setLanguage("en-US");
await flutterTts.speak(results['ReturnMessage']); await flutterTts.speak(results['ReturnMessage']);
} else if (results['ReturnMessage_Ar'] != null) { } else if (results['ReturnMessage_Ar'] != null) {
await flutterTts.setLanguage("ar-SA"); await flutterTts.setLanguage("ar-SA");
await flutterTts.setVoice("ar-sa-x-sfg#male_1-local"); //await flutterTts.setVoice("ar-sa-x-sfg#male_1-local");
await flutterTts.speak(results['ReturnMessage_Ar']); await flutterTts.speak(results['ReturnMessage_Ar']);
} }
// Future.delayed(const Duration(seconds: 10), () { // Future.delayed(const Duration(seconds: 10), () {

Loading…
Cancel
Save