@ -2,12 +2,14 @@ import 'dart:math';
import ' package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart ' ;
import ' package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart ' ;
import ' package:diplomaticquarterapp/core/viewModels/project_view_model.dart ' ;
import ' package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart ' ;
import ' package:diplomaticquarterapp/pages/base/base_view.dart ' ;
import ' package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart ' ;
import ' package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart ' ;
import ' package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart ' ;
import ' package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart ' ;
import ' package:diplomaticquarterapp/uitl/translations_delegate_base.dart ' ;
import ' package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart ' ;
import ' package:diplomaticquarterapp/widgets/data_display/medical/time_line_widget.dart ' ;
import ' package:diplomaticquarterapp/widgets/data_display/text.dart ' ;
@ -17,6 +19,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import ' package:flutter/cupertino.dart ' ;
import ' package:flutter/material.dart ' ;
import ' package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart ' ;
import ' package:provider/provider.dart ' ;
import ' ../../locator.dart ' ;
import ' doctor/doctor_home_page.dart ' ;
import ' package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart ' ;
@ -31,6 +34,7 @@ class MedicalProfilePage extends StatefulWidget {
class _MedicalProfilePageState extends State < MedicalProfilePage > {
@ override
Widget build ( BuildContext context ) {
ProjectViewModel projectViewModel = Provider . of ( context ) ;
return BaseView < MedicalViewModel > (
onModelReady: ( model ) = > model . getAppointmentHistory ( ) ,
builder: ( _ , model , widget ) = > AppScaffold (
@ -48,11 +52,9 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
height: 210 ,
decoration: BoxDecoration (
image: DecorationImage (
image: ExactAssetImage (
' assets/images/timeline_bg.png ' ) ,
fit: BoxFit . cover
) ,
image: ExactAssetImage (
' assets/images/timeline_bg.png ' ) ,
fit: BoxFit . cover ) ,
) ,
child: Stack (
children: < Widget > [
@ -76,7 +78,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
) ,
) ,
Padding (
padding: EdgeInsets . symmetric ( vertical: 12 .0) ,
padding: EdgeInsets . symmetric ( vertical: 5 .0) ,
child: Column (
children: < Widget > [
Container (
@ -89,13 +91,19 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
flex: 1 ,
child: InkWell (
onTap: ( ) {
Navigator . push ( context ,
FadePage ( page: MyAppointments ( ) ) ) ;
Navigator . push (
context ,
FadePage (
page: MyAppointments ( ) ,
) ,
) ;
} ,
child: MedicalProfileItem (
title: ' My Appointments ' ,
title: TranslationBase . of ( context )
. myAppointments ,
imagePath: ' my_appointment_icon.png ' ,
subTitle: ' List ' ,
subTitle: TranslationBase . of ( context )
. myAppointmentsList ,
) ,
) ,
) ,
@ -103,11 +111,12 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
flex: 1 ,
child: InkWell (
onTap: ( ) = > Navigator . push ( context ,
FadePage ( page: Radiology HomePage( ) ) ) ,
FadePage ( page: Labs HomePage( ) ) ) ,
child: MedicalProfileItem (
title: ' Radiology ' ,
imagePath: ' radiology_icon.png ' ,
subTitle: ' Service ' ,
title: TranslationBase . of ( context ) . lab ,
imagePath: ' lab_result_icon.png ' ,
subTitle:
TranslationBase . of ( context ) . lab ,
) ,
) ,
) ,
@ -115,11 +124,13 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
flex: 1 ,
child: InkWell (
onTap: ( ) = > Navigator . push ( context ,
FadePage ( page: Labs HomePage( ) ) ) ,
FadePage ( page: Radiology HomePage( ) ) ) ,
child: MedicalProfileItem (
title: ' Lab ' ,
imagePath: ' lab_result_icon.png ' ,
subTitle: ' Result ' ,
title: TranslationBase . of ( context )
. radiology ,
imagePath: ' radiology_icon.png ' ,
subTitle: TranslationBase . of ( context )
. radiologySubtitle ,
) ,
) ,
) ,
@ -132,14 +143,18 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
child: InkWell (
onTap: ( ) {
Navigator . push (
context ,
FadePage (
page: HomePrescriptionsPage ( ) ) ) ;
context ,
FadePage (
page: HomePrescriptionsPage ( ) ,
) ,
) ;
} ,
child: MedicalProfileItem (
title: ' Medicines ' ,
title: TranslationBase . of ( context )
. medicines ,
imagePath: ' prescription_icon.png ' ,
subTitle: ' Prescriptions ' ,
subTitle: TranslationBase . of ( context )
. medicinesSubtitle ,
) ,
) ,
) ,
@ -147,13 +162,17 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
flex: 1 ,
child: InkWell (
onTap: ( ) = > Navigator . push (
context ,
FadePage (
page: VitalSignDetailsScreen ( ) ) ) ,
context ,
FadePage (
page: VitalSignDetailsScreen ( ) ,
) ,
) ,
child: MedicalProfileItem (
title: ' Vital Signs ' ,
title: TranslationBase . of ( context )
. vitalSigns ,
imagePath: ' medical_history_icon.png ' ,
subTitle: ' Reports ' ,
subTitle: TranslationBase . of ( context )
. vitalSignsSubtitle ,
) ,
) ,
) ,
@ -163,9 +182,11 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
/ / onTap: ( ) = > Navigator . push (
/ / context , FadePage ( page: RadiologyHomePage ( ) ) ) ,
child: MedicalProfileItem (
title: ' My Medicines ' ,
title: TranslationBase . of ( context )
. myMedical ,
imagePath: ' radiology_icon.png ' ,
subTitle: ' Service ' ,
subTitle: TranslationBase . of ( context )
. myMedicalSubtitle ,
) ,
) ,
) ,
@ -177,13 +198,19 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
flex: 1 ,
child: InkWell (
onTap: ( ) {
Navigator . push ( context ,
FadePage ( page: DoctorHomePage ( ) ) ) ;
Navigator . push (
context ,
FadePage (
page: DoctorHomePage ( ) ,
) ,
) ;
} ,
child: MedicalProfileItem (
title: ' My Doctor ' ,
title: TranslationBase . of ( context )
. myDoctor ,
imagePath: ' doctor_icon.png ' ,
subTitle: ' List ' ,
subTitle: TranslationBase . of ( context )
. myDoctorSubtitle ,
) ,
) ,
) ,
@ -196,10 +223,11 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
/ / FadePage ( page: InsuranceApproval ( ) ) ) ;
/ / } ,
child: MedicalProfileItem (
title: ' Eye ' ,
title: TranslationBase . of ( context ) . eye ,
imagePath:
' insurance_approvals_icon.png ' ,
subTitle: ' Measurement ' ,
subTitle: TranslationBase . of ( context )
. eyeSubtitle ,
) ,
) ,
) ,
@ -211,9 +239,11 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
FadePage ( page: InsuranceCard ( ) ) ) ;
} ,
child: MedicalProfileItem (
title: ' Insurance ' ,
title: TranslationBase . of ( context )
. insurance ,
imagePath: ' insurance_card_icon.png ' ,
subTitle: ' Card ' ,
subTitle: TranslationBase . of ( context )
. insuranceSubtitle ,
) ,
) ,
) ,
@ -229,32 +259,38 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
/ / context , FadePage ( page: DoctorHomePage ( ) ) ) ;
/ / } ,
child: MedicalProfileItem (
title: ' Update Insurance ' ,
title: TranslationBase . of ( context )
. updateInsurance ,
imagePath: ' insurance_card_icon.png ' ,
subTitle: ' card ' ,
subTitle: TranslationBase . of ( context )
. updateInsuranceSubtitle ,
) ,
) ,
) ,
Expanded (
flex: 1 ,
child: InkWell (
/ / onTap: ( ) {
/ / Navigator . push (
/ / context , FadePage ( page: InsuranceApproval ( ) ) ) ;
/ / } ,
onTap: ( ) {
Navigator . push (
context , FadePage ( page: InsuranceApproval ( ) ) ) ;
} ,
child: MedicalProfileItem (
title: ' Insurance Approval ' ,
title: TranslationBase . of ( context )
. insuranceApproval ,
imagePath: ' insurance_approvals_icon.png ' ,
subTitle: ' ' ,
subTitle: TranslationBase . of ( context )
. insuranceApprovalSubtitle ,
) ,
) ,
) ,
Expanded (
flex: 1 ,
child: MedicalProfileItem (
title: ' Allergies ' ,
title:
TranslationBase . of ( context ) . allergies ,
imagePath: ' medical_history_icon.png ' ,
subTitle: ' Diagnosed ' ,
subTitle: TranslationBase . of ( context )
. allergiesSubtitle ,
) ,
) ,
] ) ,
@ -268,9 +304,11 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
/ / context , FadePage ( page: DoctorHomePage ( ) ) ) ;
/ / } ,
child: MedicalProfileItem (
title: ' My Vaccines ' ,
title: TranslationBase . of ( context )
. myVaccines ,
imagePath: ' insurance_card_icon.png ' ,
subTitle: ' card ' ,
subTitle: TranslationBase . of ( context )
. myVaccinesSubtitle ,
) ,
) ,
) ,
@ -282,18 +320,21 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
FadePage ( page: HomeReportPage ( ) ) ) ;
} ,
child: MedicalProfileItem (
title: ' Medical ' ,
title:
TranslationBase . of ( context ) . medical ,
imagePath: ' insurance_approvals_icon.png ' ,
subTitle: ' Reports ' ,
subTitle: TranslationBase . of ( context )
. medicalSubtitle ,
) ,
) ,
) ,
Expanded (
flex: 1 ,
child: MedicalProfileItem (
title: ' Monthly ' ,
title: TranslationBase . of ( context ) . monthly ,
imagePath: ' medical_history_icon.png ' ,
subTitle: ' Report ' ,
subTitle: TranslationBase . of ( context )
. monthlySubtitle ,
) ,
) ,
] ) ,
@ -307,9 +348,10 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
/ / context , FadePage ( page: DoctorHomePage ( ) ) ) ;
/ / } ,
child: MedicalProfileItem (
title: ' Sick ' ,
title: TranslationBase . of ( context ) . sick ,
imagePath: ' insurance_card_icon.png ' ,
subTitle: ' Leaves ' ,
subTitle: TranslationBase . of ( context )
. sickSubtitle ,
) ,
) ,
) ,
@ -321,18 +363,22 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
/ / context , FadePage ( page: InsuranceApproval ( ) ) ) ;
/ / } ,
child: MedicalProfileItem (
title: ' My Balance ' ,
title:
TranslationBase . of ( context ) . myBalance ,
imagePath: ' insurance_approvals_icon.png ' ,
subTitle: ' Credit ' ,
subTitle: TranslationBase . of ( context )
. myBalanceSubtitle ,
) ,
) ,
) ,
Expanded (
flex: 1 ,
child: MedicalProfileItem (
title: ' Patient Call ' ,
title:
TranslationBase . of ( context ) . patientCall ,
imagePath: ' medical_history_icon.png ' ,
subTitle: ' Service ' ,
subTitle: TranslationBase . of ( context )
. patientCallSubtitle ,
) ,
) ,
] ) ,
@ -346,9 +392,11 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
/ / context , FadePage ( page: DoctorHomePage ( ) ) ) ;
/ / } ,
child: MedicalProfileItem (
title: ' Smart Watches ' ,
title: TranslationBase . of ( context )
. smartWatches ,
imagePath: ' insurance_card_icon.png ' ,
subTitle: ' Pairing ' ,
subTitle: TranslationBase . of ( context )
. smartWatchesSubtitle ,
) ,
) ,
) ,
@ -360,18 +408,21 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
/ / context , FadePage ( page: InsuranceApproval ( ) ) ) ;
/ / } ,
child: MedicalProfileItem (
title: ' My Trackers ' ,
title: TranslationBase . of ( context )
. myTrackers ,
imagePath: ' insurance_approvals_icon.png ' ,
subTitle: ' Service ' ,
subTitle: TranslationBase . of ( context )
. myTrackersSubtitle ,
) ,
) ,
) ,
Expanded (
flex: 1 ,
child: MedicalProfileItem (
title: ' Ask Your ' ,
title: TranslationBase . of ( context ) . askYour ,
imagePath: ' medical_history_icon.png ' ,
subTitle: ' Doctor ' ,
subTitle: TranslationBase . of ( context )
. askYourSubtitle ,
) ,
) ,
] ) ,
@ -385,9 +436,11 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
/ / context , FadePage ( page: DoctorHomePage ( ) ) ) ;
/ / } ,
child: MedicalProfileItem (
title: ' Internet ' ,
title:
TranslationBase . of ( context ) . internet ,
imagePath: ' insurance_card_icon.png ' ,
subTitle: ' Pairing ' ,
subTitle: TranslationBase . of ( context )
. internetSubtitle ,
) ,
) ,
) ,
@ -399,19 +452,17 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
/ / context , FadePage ( page: InsuranceApproval ( ) ) ) ;
/ / } ,
child: MedicalProfileItem (
title: ' My Trackers ' ,
title:
TranslationBase . of ( context ) . chatbot ,
imagePath: ' insurance_approvals_icon.png ' ,
subTitle: ' Service ' ,
subTitle: TranslationBase . of ( context )
. chatbotSubtitle ,
) ,
) ,
) ,
Expanded (
flex: 1 ,
child: MedicalProfileItem (
title: ' Ask Your ' ,
imagePath: ' medical_history_icon.png ' ,
subTitle: ' Doctor ' ,
) ,
child: Container ( ) ,
) ,
] ) ,
] ,
@ -428,17 +479,16 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
width: double . infinity ,
height: 70 ,
decoration: BoxDecoration (
color: Colors . grey [ 600 ] ,
shape: BoxShape . rectangle ,
border: Border . all (
color: Colors . transparent , width: 0.5 ) ,
borderRadius: BorderRadius . all ( Radius . circular ( 9 ) ) ,
image: DecorationImage (
image: ExactAssetImage (
' assets/images/bg_graphic.png ' ) ,
fit: BoxFit . cover
)
) ,
color: Colors . grey [ 600 ] ,
shape: BoxShape . rectangle ,
border: Border . all (
color: Colors . transparent , width: 0.5 ) ,
borderRadius:
BorderRadius . all ( Radius . circular ( 9 ) ) ,
image: DecorationImage (
image: ExactAssetImage (
' assets/images/bg_graphic.png ' ) ,
fit: BoxFit . cover ) ) ,
child: Column (
crossAxisAlignment: CrossAxisAlignment . center ,
children: < Widget > [
@ -464,9 +514,10 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
) ,
Positioned (
top: 2 ,
left: 10 ,
left: projectViewModel . isArabic ? 0 : 10 ,
right: projectViewModel . isArabic ? 10 : 0 ,
child: Texts (
' Time Line ' ,
TranslationBase . of ( context ) . timeLine ,
color: Colors . white ,
fontSize: 14 ,
fontWeight: FontWeight . normal ,