|
|
|
@ -27,7 +27,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
|
|
|
|
|
import '../../locator.dart';
|
|
|
|
|
|
|
|
|
|
class HomePage extends StatefulWidget {
|
|
|
|
@ -49,8 +49,8 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
// });
|
|
|
|
|
// super.initState();
|
|
|
|
|
// }
|
|
|
|
|
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
|
|
|
|
|
|
|
|
|
|
AuthenticatedUserObject authenticatedUserObject =
|
|
|
|
|
locator<AuthenticatedUserObject>();
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
@ -93,9 +93,10 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
Container(width: double.infinity, height:projectViewModel.isArabic ? 120:110),
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: projectViewModel.isArabic ? 120 : 110),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Positioned(
|
|
|
|
@ -110,7 +111,7 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
Orientation.landscape
|
|
|
|
|
? 0.02
|
|
|
|
|
: 0.03),
|
|
|
|
|
child: (!model.isLogin )
|
|
|
|
|
child: (!model.isLogin)
|
|
|
|
|
? Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: 160,
|
|
|
|
@ -179,7 +180,6 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
color: Theme.of(context)
|
|
|
|
|
.primaryColor,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -307,7 +307,9 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
bold: true,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).height,
|
|
|
|
|
TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.height,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
),
|
|
|
|
@ -339,7 +341,9 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
bold: true,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).weight,
|
|
|
|
|
TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.weight,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
)
|
|
|
|
@ -353,8 +357,10 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Image.asset(
|
|
|
|
|
'assets/images/blood-drop.png',
|
|
|
|
@ -368,7 +374,9 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).bloodType,
|
|
|
|
|
TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.bloodType,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
)
|
|
|
|
@ -407,28 +415,35 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
padding: const EdgeInsets.all(15.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
SizedBox(height: 15,),
|
|
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: 60,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
|
borderRadius: BorderRadius.circular(12)
|
|
|
|
|
),
|
|
|
|
|
child: Center(child: Image.asset('assets/images/vital_sign_icon.png',
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(12)),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
'assets/images/vital_sign_icon.png',
|
|
|
|
|
width: 80,
|
|
|
|
|
height: 50,
|
|
|
|
|
fit: BoxFit.contain,)),
|
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 20,),
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.vitalSigns,
|
|
|
|
|
TranslationBase.of(context).vitalSigns,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
bold: true,
|
|
|
|
|
fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7,
|
|
|
|
|
fontSize: projectViewModel.isArabic
|
|
|
|
|
? SizeConfig.textMultiplier * 1.5
|
|
|
|
|
: SizeConfig.textMultiplier * 1.7,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -456,26 +471,35 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
padding: const EdgeInsets.all(15.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
SizedBox(height: 15,),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: 50,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
|
borderRadius: BorderRadius.circular(12)
|
|
|
|
|
),
|
|
|
|
|
child: Center(child: Image.asset('assets/images/search_medicine_icon.png',
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(12)),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
'assets/images/search_medicine_icon.png',
|
|
|
|
|
width: 50,
|
|
|
|
|
height: 50,
|
|
|
|
|
fit: BoxFit.contain,)),
|
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 20,),
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).searchMedicine,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
bold: true,
|
|
|
|
|
fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7,
|
|
|
|
|
fontSize: projectViewModel.isArabic
|
|
|
|
|
? SizeConfig.textMultiplier * 1.5
|
|
|
|
|
: SizeConfig.textMultiplier * 1.7,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -487,8 +511,9 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: DashboardItem(opacity: 1.0,
|
|
|
|
|
onTap: (){
|
|
|
|
|
child: DashboardItem(
|
|
|
|
|
opacity: 1.0,
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
@ -501,25 +526,35 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
padding: const EdgeInsets.all(15.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
SizedBox(height: 15,),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
|
borderRadius: BorderRadius.circular(12)
|
|
|
|
|
),
|
|
|
|
|
child: Center(child: Image.asset('assets/images/online_payment_icon.png',
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(12)),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
'assets/images/online_payment_icon.png',
|
|
|
|
|
width: 80,
|
|
|
|
|
height: 50,
|
|
|
|
|
fit: BoxFit.contain,)),
|
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 15,),
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).onlinePaymentService,
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.onlinePaymentService,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
bold: true,
|
|
|
|
|
fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7,
|
|
|
|
|
fontSize: projectViewModel.isArabic
|
|
|
|
|
? SizeConfig.textMultiplier * 1.5
|
|
|
|
|
: SizeConfig.textMultiplier * 1.7,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -555,34 +590,33 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context)
|
|
|
|
|
.myAppointments,
|
|
|
|
|
title:
|
|
|
|
|
TranslationBase.of(context).myAppointments,
|
|
|
|
|
imagePath: 'my_appointment_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).myAppointmentsList,
|
|
|
|
|
subTitle: TranslationBase.of(context)
|
|
|
|
|
.myAppointmentsList,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () => Navigator.push(context,
|
|
|
|
|
FadePage(page: LabsHomePage())),
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context, FadePage(page: LabsHomePage())),
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).lab,
|
|
|
|
|
imagePath: 'lab_result_icon.png',
|
|
|
|
|
subTitle:
|
|
|
|
|
TranslationBase.of(context).lab,
|
|
|
|
|
subTitle: TranslationBase.of(context).lab,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () => Navigator.push(context,
|
|
|
|
|
FadePage(page: RadiologyHomePage())),
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context, FadePage(page: RadiologyHomePage())),
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context)
|
|
|
|
|
.radiology,
|
|
|
|
|
title: TranslationBase.of(context).radiology,
|
|
|
|
|
imagePath: 'radiology_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context)
|
|
|
|
|
.radiologySubtitle,
|
|
|
|
@ -605,8 +639,7 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context)
|
|
|
|
|
.medicines,
|
|
|
|
|
title: TranslationBase.of(context).medicines,
|
|
|
|
|
imagePath: 'prescription_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context)
|
|
|
|
|
.medicinesSubtitle,
|
|
|
|
@ -625,8 +658,7 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context)
|
|
|
|
|
.myDoctor,
|
|
|
|
|
title: TranslationBase.of(context).myDoctor,
|
|
|
|
|
imagePath: 'doctor_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context)
|
|
|
|
|
.myDoctorSubtitle,
|
|
|
|
@ -637,12 +669,11 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(context,
|
|
|
|
|
FadePage(page: InsuranceCard()));
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context, FadePage(page: InsuranceCard()));
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context)
|
|
|
|
|
.insurance,
|
|
|
|
|
title: TranslationBase.of(context).insurance,
|
|
|
|
|
imagePath: 'insurance_card_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context)
|
|
|
|
|
.insuranceSubtitle,
|
|
|
|
@ -651,7 +682,6 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -664,7 +694,7 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
DashboardItem(
|
|
|
|
|
opacity:1.0,
|
|
|
|
|
opacity: 1.0,
|
|
|
|
|
child: Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
@ -677,31 +707,38 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
bold: true,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).viewAllHabibMedicalService,
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.viewAllHabibMedicalService,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(),
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: Container(),
|
|
|
|
|
// ),
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).viewAll,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
bold: true,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
height: 100,
|
|
|
|
|
height: 106,
|
|
|
|
|
imageName: 'ask_doctor_bg.png',
|
|
|
|
|
//color: Colors.grey[700],
|
|
|
|
|
//color: Colors.grey[700],
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.45,
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context, FadePage(page: AllHabibMedicalService(goToMyProfile: widget.goToMyProfile,))),
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: AllHabibMedicalService(
|
|
|
|
|
goToMyProfile: widget.goToMyProfile,
|
|
|
|
|
))),
|
|
|
|
|
),
|
|
|
|
|
DashboardItem(
|
|
|
|
|
opacity:1.0,
|
|
|
|
|
opacity: 1.0,
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context, FadePage(page: ContactUsPage()));
|
|
|
|
@ -721,7 +758,7 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
TranslationBase.of(context).viewAllWaysReachUs,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.0 ,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.0,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(),
|
|
|
|
@ -786,7 +823,9 @@ class DashboardItem extends StatelessWidget {
|
|
|
|
|
this.width,
|
|
|
|
|
this.height,
|
|
|
|
|
this.color,
|
|
|
|
|
this.opacity = 1.0,this.icon,this.margin=0})
|
|
|
|
|
this.opacity = 1.0,
|
|
|
|
|
this.icon,
|
|
|
|
|
this.margin = 0})
|
|
|
|
|
: super(key: key);
|
|
|
|
|
final bool hasBorder;
|
|
|
|
|
final String imageName;
|
|
|
|
|