Merge branch 'mirza_home_page' into development_new_design_2.0

merge-update-with-lab-changes
Mirza.Shafique 5 years ago
commit e24eaa791b

@ -86,7 +86,9 @@ class _HospitalsPageState extends State<HospitalsPage> {
Expanded( Expanded(
child: Padding( child: Padding(
padding: EdgeInsets.only(left: 12, right: 12), padding: EdgeInsets.only(left: 12, right: 12),
child: Text( child: Column(
children: [
Text(
_location.locationName?.trim() ?? "", _location.locationName?.trim() ?? "",
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
@ -95,6 +97,20 @@ class _HospitalsPageState extends State<HospitalsPage> {
letterSpacing: -0.56, letterSpacing: -0.56,
), ),
), ),
Text(
TranslationBase.of(context).km+" "+ _location.distanceInKilometers.toString() ?? "",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
letterSpacing: -0.56,
),
),
],
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
),
), ),
), //model.cOCItemList[index].cOCTitl ), //model.cOCItemList[index].cOCTitl
IconButton( IconButton(

@ -105,7 +105,7 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
), ),
), ),
SizedBox( SizedBox(
height: 4, height: 2,
), ),
Text( Text(
_location.cityName?.trim() ?? "", _location.cityName?.trim() ?? "",
@ -116,6 +116,18 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
letterSpacing: -0.56, letterSpacing: -0.56,
), ),
), ),
SizedBox(
height: 2,
),
Text(
TranslationBase.of(context).km+" "+ _location.distanceInKilometers.toString() ?? "",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
letterSpacing: -0.56,
),
),
], ],
), ),
), ),

@ -6,12 +6,15 @@ import 'package:diplomaticquarterapp/models/CovidDriveThru/DriveThroughTestingCe
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-details.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-details.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart'; import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:maps_launcher/maps_launcher.dart'; import 'package:maps_launcher/maps_launcher.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -34,6 +37,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
List<ImagesInfo> imagesInfo = List(); List<ImagesInfo> imagesInfo = List();
DriveThroughTestingCenterModel selectedProject; DriveThroughTestingCenterModel selectedProject;
final GlobalKey locationDropdownKey = GlobalKey();
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
@ -61,42 +65,68 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
description: TranslationBase.of(context).covidInfo, description: TranslationBase.of(context).covidInfo,
isShowDecPage: true, isShowDecPage: true,
body: SingleChildScrollView( showNewAppBarTitle: true,
showNewAppBar: true,
backgroundColor: CustomColors.appBackgroudGreyColor,
body: Column(
children: [
Expanded(
child: SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 0.0),
child: Column( child: Column(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
Padding(
padding: const EdgeInsets.only(left: 14, right: 14),
child: Column(
children: [
Container( Container(
alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft, alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
child: Text(TranslationBase.of(context).resultHeader, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 22.0, color: Colors.black)), child: Text(TranslationBase.of(context).resultHeader, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0, color: Colors.black, letterSpacing: -1.14)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 6.0),
child: Text(TranslationBase.of(context).covidInfo, style: TextStyle(fontSize: 16.0, color: Colors.black)), child: Text(TranslationBase.of(context).covidInfo, style: TextStyle(fontSize: 14.0, color: Colors.black, letterSpacing: -0.56)),
),
InkWell(
onTap: () {
// dropdownKey.currentState;
// openDropdown(clinicDropdownKey);
},
child: Container(
width: double.infinity,
decoration: containerRadius(Colors.white, 12),
margin: EdgeInsets.only(top: 12),
padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12),
child: Row(
children: [
Flexible(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).selectLocation,
style: TextStyle(
fontSize: 11,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
), ),
Container(
margin: EdgeInsets.only(top: 20.0),
alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0, letterSpacing: 0.8, color: Colors.grey[700])),
), ),
Container( Container(
height: 60.0, height: 18,
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(
color: Colors.grey[400],
width: 1.0,
),
borderRadius: BorderRadius.circular(10),
),
padding: EdgeInsets.all(8.0),
width: MediaQuery.of(context).size.width,
margin: EdgeInsets.only(top: 15.0),
child: DropdownButtonHideUnderline( child: DropdownButtonHideUnderline(
child: DropdownButton<DriveThroughTestingCenterModel>( child: DropdownButton<DriveThroughTestingCenterModel>(
hint: new Text(TranslationBase.of(context).selectAddress), onTap: () {
print("Clicked");
},
key: locationDropdownKey,
hint: new Text(
TranslationBase.of(context).selectAddress,
),
value: selectedProject, value: selectedProject,
iconSize: 0,
isExpanded: true,
style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
items: projectsList.map((DriveThroughTestingCenterModel item) { items: projectsList.map((DriveThroughTestingCenterModel item) {
return new DropdownMenuItem<DriveThroughTestingCenterModel>( return new DropdownMenuItem<DriveThroughTestingCenterModel>(
value: item, value: item,
@ -110,20 +140,25 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
}); });
}, },
), ),
)), ),
isLocationSelected ),
? Container( ],
margin: EdgeInsets.only(top: 15.0), ),
alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft, ),
child: Text(TranslationBase.of(context).selectLocation, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0, letterSpacing: 0.8, color: Colors.black)), Icon(Icons.keyboard_arrow_down),
) ],
: Container(), ),
),
),
],
),
),
mHeight(20),
isLocationSelected isLocationSelected
? Container( ? Stack(
children: [
Container(
margin: EdgeInsets.only(top: 5.0), margin: EdgeInsets.only(top: 5.0),
decoration: BoxDecoration(
border: Border.all(color: Colors.grey[400], width: 1.0),
),
child: Image.network("https://maps.googleapis.com/maps/api/staticmap?center=" + child: Image.network("https://maps.googleapis.com/maps/api/staticmap?center=" +
this.projectLat + this.projectLat +
"," + "," +
@ -133,67 +168,59 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
"," + "," +
this.projectLong + this.projectLong +
"&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"), "&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"),
)
: SizedBox(
height: MediaQuery.of(context).size.height * 0.35,
), ),
Container( Row(
height: MediaQuery.of(context).size.height * 0.15, mainAxisAlignment: MainAxisAlignment.end,
width: double.infinity, crossAxisAlignment: CrossAxisAlignment.end,
child: Column( children: [
children: <Widget>[ InkWell(
Container( onTap: () {
margin: EdgeInsets.only(top: 10.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.91,
height: 45.0,
child: RaisedButton(
color: new Color(0xFFc5272d),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: Colors.red[300],
onPressed: () {
getDirections(); getDirections();
}, },
child: Text(TranslationBase.of(context).getDirections, style: TextStyle(fontSize: 18.0)), child: Card(
shape: cardRadius(1000),
elevation: 4,
margin: EdgeInsets.all(12),
child: Padding(
padding: const EdgeInsets.only(left: 12, right: 12, top: 6, bottom: 6),
child: Row(
children: [
SvgPicture.asset(
"assets/images/new/blood_pressure.svg",
width: 18,
height: 18,
), ),
mWidth(6),
Text(
TranslationBase.of(context).getDirections,
style: TextStyle(
color: Colors.black,
fontSize: 11,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
), ),
)
],
), ),
Container(
margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0),
child: Flex(
direction: Axis.horizontal,
children: <Widget>[
Expanded(
flex: 1,
child: Container(
margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
), ),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: Colors.grey[500],
onPressed: () {
back();
},
child: Text(TranslationBase.of(context).back, style: TextStyle(fontSize: 18.0)),
), ),
), ),
],
), ),
],
)
: SizedBox(
height: MediaQuery.of(context).size.height * 0.35,
), ),
Expanded( mHeight(12),
flex: 1, ],
child: Container( ),
margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0), ),
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
child: ButtonTheme( child: ButtonTheme(
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0), borderRadius: BorderRadius.circular(10.0),
@ -201,28 +228,25 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
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: CustomColors.accentColor,
textColor: Colors.white, textColor: Colors.white,
disabledTextColor: Colors.white, disabledTextColor: Colors.white,
disabledColor: Colors.grey[500], disabledColor: CustomColors.accentColor,
onPressed: () { onPressed: () {
next(); next();
}, },
child: Text(TranslationBase.of(context).next, style: TextStyle(fontSize: 18.0)), child: Text(
TranslationBase.of(context).next,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
letterSpacing: -0.44,
), ),
), ),
), ),
), )),
],
),
),
],
),
),
], ],
), ),
),
),
); );
} }

@ -153,7 +153,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
width: double.infinity, width: double.infinity,
height: MediaQuery.of(context).size.width * 0.26, height: MediaQuery.of(context).size.width * 0.26,
child: ListView.separated( child: ListView.separated(
itemCount: 4, itemCount: 5,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
@ -163,13 +163,13 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
child: myMedicalList[index], child: myMedicalList[index],
width: MediaQuery.of(context).size.width * 0.26, width: MediaQuery.of(context).size.width * 0.26,
height: MediaQuery.of(context).size.width * 0.26, height: MediaQuery.of(context).size.width * 0.26,
margin: EdgeInsets.only(left: index == 3 ? 20 : 0, right: index == 0 ? 20 : 0), margin: EdgeInsets.only(left: index == 4 ? 20 : 0, right: index == 0 ? 20 : 0),
) )
: Container( : Container(
child: myMedicalList[index], child: myMedicalList[index],
width: MediaQuery.of(context).size.width * 0.26, width: MediaQuery.of(context).size.width * 0.26,
height: MediaQuery.of(context).size.width * 0.26, height: MediaQuery.of(context).size.width * 0.26,
margin: EdgeInsets.only(left: index == 0 ? 20 : 0, right: index == 3 ? 20 : 0), margin: EdgeInsets.only(left: index == 0 ? 20 : 0, right: index == 4 ? 20 : 0),
); );
}, },
separatorBuilder: (BuildContext context, int index) { separatorBuilder: (BuildContext context, int index) {

@ -84,7 +84,10 @@ class PrescriptionItemsPage extends StatelessWidget {
margin: EdgeInsets.only(left: 16, right: 16, top: index == 0 ? 16 : 4, bottom: 4), margin: EdgeInsets.only(left: 16, right: 16, top: index == 0 ? 16 : 4, bottom: 4),
shape: cardRadius(12), shape: cardRadius(12),
child: Padding( child: Padding(
padding: const EdgeInsets.only(top: 12, bottom: 20, left: 20, right: 20), padding: EdgeInsets.only(top: 12, bottom: 20, left:projectViewModel.isArabic? 12:20, right: projectViewModel.isArabic? 20:12),
child: Row(
children: [
Flexible(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -179,6 +182,10 @@ class PrescriptionItemsPage extends StatelessWidget {
], ],
), ),
), ),
Icon(Icons.arrow_forward_ios,size: 16,),
],
),
),
), ),
), ),
); );
@ -231,7 +238,10 @@ class PrescriptionItemsPage extends StatelessWidget {
], ],
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.only(top: 12, bottom: 20, left: 20, right: 20), padding: EdgeInsets.only(top: 12, bottom: 20, left:projectViewModel.isArabic? 12:20, right: projectViewModel.isArabic? 20:12),
child: Row(
children: [
Flexible(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -289,6 +299,10 @@ class PrescriptionItemsPage extends StatelessWidget {
], ],
), ),
), ),
Icon(Icons.arrow_forward_ios,size: 16,),
],
),
),
), ),
); );
}, },

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_details_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_details_page.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -77,14 +78,17 @@ class PrescriptionsHistoryPage extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: _color, color: _color,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
bottomLeft: Radius.circular(10.0), bottomLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topRight:projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0),
bottomRight:projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0),
), ),
), ),
), ),
Expanded( Expanded(
child: Padding( child: Padding(
padding: EdgeInsets.only(left: 12, right: 12), padding: EdgeInsets.only(left: projectViewModel.isArabic?6:12, right: projectViewModel.isArabic?12:6),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
@ -122,7 +126,9 @@ class PrescriptionsHistoryPage extends StatelessWidget {
], ],
), ),
), ),
) ),
Icon(Icons.arrow_forward_ios,size: 16,),
mWidth(6),
], ],
), ),
)); ));

@ -572,19 +572,6 @@ class Utils {
), ),
)); ));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(6)
? Navigator.push(
context,
FadePage(
page: DoctorHomePage(),
),
)
: null,
child:
MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null, onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null,
child: MedicalProfileItem( child: MedicalProfileItem(
@ -595,31 +582,6 @@ class Utils {
), ),
)); ));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(25)
? Navigator.push(
context,
FadePage(page: VitalSignDetailsScreen()),
)
: null,
child: MedicalProfileItem(
title: TranslationBase.of(context).vitalSigns,
imagePath: 'vital_signs.png',
subTitle: TranslationBase.of(context).vitalSignsSubtitle,
isEnable: projectViewModel.havePrivilege(25),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(48) ? Navigator.push(context, FadePage(page: ActiveMedicationsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myMedical,
imagePath: 'active_medications.png',
subTitle: TranslationBase.of(context).myMedicalSubtitle,
isEnable: false,
),
));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(6) onTap: () => projectViewModel.havePrivilege(6)
? Navigator.push( ? Navigator.push(
@ -629,196 +591,10 @@ class Utils {
), ),
) )
: null, : null,
child: MedicalProfileItem( child:
title: TranslationBase.of(context).myDoctor, imagePath: 'doctor_icon.png', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)), MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: MyInvoices())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myInvoice,
imagePath: 'Invoice.png',
subTitle: TranslationBase.of(context).invoicesList,
isEnable: projectViewModel.havePrivilege(14),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).eye,
imagePath: 'eye_measurement_icon.png',
subTitle: TranslationBase.of(context).eyeSubtitle,
isEnable: projectViewModel.havePrivilege(14),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(22) ? Navigator.push(context, FadePage(page: InsuranceCard())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).insurance,
imagePath: 'insurance_card_icon.png',
subTitle: TranslationBase.of(context).insuranceSubtitle,
isEnable: projectViewModel.havePrivilege(22),
),
));
medical.add(InkWell(
onTap: () {
Navigator.push(context, FadePage(page: InsuranceUpdate()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).updateInsurance,
imagePath: 'insurance_update_icon_.png',
subTitle: TranslationBase.of(context).updateInsuranceSubtitle,
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(18) ? Navigator.push(context, FadePage(page: InsuranceApproval())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).insuranceApproval,
imagePath: 'insurance_approvals_icon.png',
subTitle: TranslationBase.of(context).insuranceApprovalSubtitle,
isEnable: projectViewModel.havePrivilege(18),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(23) ? Navigator.push(context, FadePage(page: AllergiesPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).allergies,
imagePath: 'my_allergies_icon.png',
subTitle: TranslationBase.of(context).allergiesSubtitle,
isEnable: projectViewModel.havePrivilege(23),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(26) ? Navigator.push(context, FadePage(page: MyVaccines())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myVaccines,
imagePath: 'my_vaccines_icon.png',
subTitle: TranslationBase.of(context).myVaccinesSubtitle,
isEnable: projectViewModel.havePrivilege(26),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(20) ? Navigator.push(context, FadePage(page: HomeReportPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).medical,
imagePath: 'medical_reports_icon.png',
subTitle: TranslationBase.of(context).medicalSubtitle,
isEnable: projectViewModel.havePrivilege(20),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(19) ? Navigator.push(context, FadePage(page: MonthlyReportsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).monthly,
imagePath: 'monthly_reports_icon.png',
subTitle: TranslationBase.of(context).monthlySubtitle,
isEnable: projectViewModel.havePrivilege(19),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(16) ? Navigator.push(context, FadePage(page: PatientSickLeavePage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).sick,
imagePath: 'sick_leaves_icons.png',
subTitle: TranslationBase.of(context).sickSubtitle,
isEnable: projectViewModel.havePrivilege(16),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(47) ? Navigator.push(context, FadePage(page: MyBalancePage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myBalance,
imagePath: 'check-in.png',
subTitle: TranslationBase.of(context).myBalanceSubtitle,
isEnable: projectViewModel.havePrivilege(47),
),
));
// TODO mosa check it
medical.add(MedicalProfileItem(
title: TranslationBase.of(context).patientCall,
imagePath: 'medical_history_icon.png',
subTitle: TranslationBase.of(context).patientCallSubtitle,
isEnable: projectViewModel.havePrivilege(61),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(24) ? Navigator.push(context, FadePage(page: MyTrackers())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myTrackers,
imagePath: 'my_tracker_icon.png',
subTitle: TranslationBase.of(context).myTrackersSubtitle,
isEnable: projectViewModel.havePrivilege(24),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(30) ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).smartWatches,
imagePath: 'smartwatch_icon.png',
subTitle: TranslationBase.of(context).smartWatchesSubtitle,
isEnable: projectViewModel.havePrivilege(30),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(28) ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).askYour, imagePath: 'ask_doctor_icon.png', subTitle: TranslationBase.of(context).askYourSubtitle, isEnable: projectViewModel.havePrivilege(28)),
));
if (projectViewModel.havePrivilege(32) || true) {
medical.add(InkWell(
onTap: () {
if (projectViewModel.isLogin) {
userData().then((userData_) {
String patientID = userData_.patientID.toString();
GifLoaderDialogUtils.showMyDialog(context);
projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)});
});
} else {
Navigator.push(
context,
FadePage(
page: NotAutPage(
title: TranslationBase.of(context).autoWifi,
description: TranslationBase.of(context).infoAutoWifi,
infoList: [],
imagesInfo: [
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/connect-to/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/connect-to/ar/0.png'),
],
)));
}
},
child: MedicalProfileItem(
title: TranslationBase.of(context).internet,
imagePath: 'insurance_card_icon.png',
subTitle: TranslationBase.of(context).internetSubtitle,
),
)); ));
}
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(40) ? launch('whatsapp://send?phone=18885521858&text=') : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).chatbot,
imagePath: 'insurance_approvals_icon.png',
subTitle: TranslationBase.of(context).chatbotSubtitle,
isEnable: projectViewModel.havePrivilege(40),
),
));
return medical; return medical;
} }

Loading…
Cancel
Save