|
|
|
@ -2,7 +2,6 @@ import 'package:diplomaticquarterapp/config/size_config.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart';
|
|
|
|
@ -11,7 +10,6 @@ import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy_module_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/widgets/data_display/text.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
@ -88,49 +86,77 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(5))),
|
|
|
|
Radius.circular(5))),
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Texts(TranslationBase.of(context).covidTest,
|
|
|
|
Texts(
|
|
|
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
|
|
|
.covidTest,
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
|
|
|
MainAxisAlignment
|
|
|
|
|
|
|
|
.spaceAround,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
top: 15.0,),
|
|
|
|
top: 15.0,
|
|
|
|
|
|
|
|
),
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
'assets/images/new-design/covid-19-car.svg',
|
|
|
|
'assets/images/new-design/covid-19-car.svg',
|
|
|
|
width: 45.0,
|
|
|
|
width: 45.0,
|
|
|
|
height: 45.0),
|
|
|
|
height: 45.0),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(top: 5.0),
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
|
|
|
top: 5.0),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Texts(TranslationBase.of(context).driveThru,
|
|
|
|
Texts(
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
TranslationBase.of(
|
|
|
|
color: Colors.white,),
|
|
|
|
context)
|
|
|
|
|
|
|
|
.driveThru,
|
|
|
|
|
|
|
|
fontWeight:
|
|
|
|
|
|
|
|
FontWeight.w700,
|
|
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
),
|
|
|
|
ButtonTheme(
|
|
|
|
ButtonTheme(
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
shape:
|
|
|
|
|
|
|
|
RoundedRectangleBorder(
|
|
|
|
borderRadius:
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(5.0),),
|
|
|
|
BorderRadius
|
|
|
|
minWidth: MediaQuery.of(context).size.width * 0.15,
|
|
|
|
.circular(
|
|
|
|
|
|
|
|
5.0),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
minWidth: MediaQuery.of(
|
|
|
|
|
|
|
|
context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width *
|
|
|
|
|
|
|
|
0.15,
|
|
|
|
height: 25.0,
|
|
|
|
height: 25.0,
|
|
|
|
child: RaisedButton(
|
|
|
|
child: RaisedButton(
|
|
|
|
color: Colors.red[800],
|
|
|
|
color: Colors
|
|
|
|
textColor: Colors.white,
|
|
|
|
.red[800],
|
|
|
|
disabledTextColor: Colors.white,
|
|
|
|
textColor:
|
|
|
|
disabledColor: new Color(0xFFbcc2c4),
|
|
|
|
Colors.white,
|
|
|
|
|
|
|
|
disabledTextColor:
|
|
|
|
|
|
|
|
Colors.white,
|
|
|
|
|
|
|
|
disabledColor:
|
|
|
|
|
|
|
|
new Color(
|
|
|
|
|
|
|
|
0xFFbcc2c4),
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: () {
|
|
|
|
navigateToCovidDriveThru();
|
|
|
|
navigateToCovidDriveThru();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Texts(
|
|
|
|
child: Texts(
|
|
|
|
TranslationBase.of(context).bookNow,
|
|
|
|
TranslationBase.of(
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
context)
|
|
|
|
color: Colors.white,
|
|
|
|
.bookNow,
|
|
|
|
|
|
|
|
fontWeight:
|
|
|
|
|
|
|
|
FontWeight
|
|
|
|
|
|
|
|
.w700,
|
|
|
|
|
|
|
|
color: Colors
|
|
|
|
|
|
|
|
.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -172,7 +198,9 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(width: double.infinity, height:projectViewModel.isArabic ?110: 80)
|
|
|
|
Container(
|
|
|
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
|
|
|
height: projectViewModel.isArabic ? 110 : 80)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
Positioned(
|
|
|
|
@ -216,7 +244,6 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontSize: 23,
|
|
|
|
fontSize: 23,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
|
|
Texts(
|
|
|
|
Texts(
|
|
|
|
TranslationBase.of(context)
|
|
|
|
TranslationBase.of(context)
|
|
|
|
.myMedicalFileSubTitle,
|
|
|
|
.myMedicalFileSubTitle,
|
|
|
|
@ -232,7 +259,8 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
widget.goToMyProfile();
|
|
|
|
widget.goToMyProfile();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
margin: EdgeInsets.only(left: 15,right: 15),
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
|
|
|
left: 15, right: 15),
|
|
|
|
width: 90,
|
|
|
|
width: 90,
|
|
|
|
height: 30,
|
|
|
|
height: 30,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
@ -245,8 +273,13 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
Radius.circular(0)),
|
|
|
|
Radius.circular(0)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Center(
|
|
|
|
child: Center(
|
|
|
|
|
|
|
|
child: InkWell(
|
|
|
|
|
|
|
|
// onTap: () {
|
|
|
|
|
|
|
|
// openBrowser();
|
|
|
|
|
|
|
|
// },
|
|
|
|
child: Texts(
|
|
|
|
child: Texts(
|
|
|
|
TranslationBase.of(context).viewMore,
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
|
|
|
.viewMore,
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontSize: 12,
|
|
|
|
fontSize: 12,
|
|
|
|
@ -254,6 +287,7 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -280,7 +314,8 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
if (projectViewModel.user != null && model.isLogin)
|
|
|
|
if (projectViewModel.user != null &&
|
|
|
|
|
|
|
|
model.isLogin)
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment:
|
|
|
|
crossAxisAlignment:
|
|
|
|
@ -300,7 +335,12 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
fontSize: 15,
|
|
|
|
fontSize: 15,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0),
|
|
|
|
margin:
|
|
|
|
|
|
|
|
EdgeInsets.fromLTRB(
|
|
|
|
|
|
|
|
8.0,
|
|
|
|
|
|
|
|
0.0,
|
|
|
|
|
|
|
|
8.0,
|
|
|
|
|
|
|
|
0.0),
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
"assets/images/new-design/verification_check.svg"),
|
|
|
|
"assets/images/new-design/verification_check.svg"),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -382,11 +422,9 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
width: 25,
|
|
|
|
width: 25,
|
|
|
|
height: 40,
|
|
|
|
height: 40,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Texts(
|
|
|
|
Texts('${model.weightKg}',
|
|
|
|
'${model.weightKg}',
|
|
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
fontSize: 17
|
|
|
|
fontSize: 17)
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -419,7 +457,9 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
if(projectViewModel.havePrivilege(64)||projectViewModel.havePrivilege(65)||projectViewModel.havePrivilege(67))
|
|
|
|
if (projectViewModel.havePrivilege(64) ||
|
|
|
|
|
|
|
|
projectViewModel.havePrivilege(65) ||
|
|
|
|
|
|
|
|
projectViewModel.havePrivilege(67))
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(left: 15, right: 15),
|
|
|
|
margin: EdgeInsets.only(left: 15, right: 15),
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
@ -449,11 +489,13 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
height: 10,
|
|
|
|
height: 10,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Texts(
|
|
|
|
Texts(
|
|
|
|
TranslationBase.of(context).homeHealthCare,
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
|
|
|
.homeHealthCare,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.55,
|
|
|
|
fontSize:
|
|
|
|
|
|
|
|
SizeConfig.textMultiplier * 1.55,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -465,8 +507,8 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
if (projectViewModel.havePrivilege(65))
|
|
|
|
if (projectViewModel.havePrivilege(65))
|
|
|
|
DashboardItem(
|
|
|
|
DashboardItem(
|
|
|
|
onTap: () => Navigator.push(context, FadePage(page: LandingPagePharmacy())),
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
|
|
|
context, FadePage(page: LandingPagePharmacy())),
|
|
|
|
child: Center(
|
|
|
|
child: Center(
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.all(15.0),
|
|
|
|
padding: const EdgeInsets.all(15.0),
|
|
|
|
@ -481,11 +523,13 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
height: 20,
|
|
|
|
height: 20,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Texts(
|
|
|
|
Texts(
|
|
|
|
TranslationBase.of(context).onlinePharmacy,
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
|
|
|
.onlinePharmacy,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.55,
|
|
|
|
fontSize:
|
|
|
|
|
|
|
|
SizeConfig.textMultiplier * 1.55,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -522,7 +566,8 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.55,
|
|
|
|
fontSize:
|
|
|
|
|
|
|
|
SizeConfig.textMultiplier * 1.55,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -639,7 +684,8 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
color: Colors.black87,
|
|
|
|
color: Colors.black87,
|
|
|
|
bold: false,
|
|
|
|
bold: false,
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.7,
|
|
|
|
fontSize:
|
|
|
|
|
|
|
|
SizeConfig.textMultiplier * 1.7,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -757,9 +803,13 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// openBrowser() {
|
|
|
|
|
|
|
|
// InAppBrowser browser = new InAppBrowser();
|
|
|
|
|
|
|
|
// browser.openUrl(url: "https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID=ca9dd276-0a20-4924-a768-fafa9a855ef1&&CustomerId=1367368");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
navigateToCovidDriveThru() {
|
|
|
|
navigateToCovidDriveThru() {
|
|
|
|
Navigator.push(context,
|
|
|
|
Navigator.push(context, FadePage(page: CovidDrivethruLocation()));
|
|
|
|
MaterialPageRoute(builder: (context) => CovidDrivethruLocation()));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -792,7 +842,9 @@ class DashboardItem extends StatelessWidget {
|
|
|
|
onTap: onTap,
|
|
|
|
onTap: onTap,
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
width: width != null ? width : MediaQuery.of(context).size.width * 0.29,
|
|
|
|
width: width != null ? width : MediaQuery.of(context).size.width * 0.29,
|
|
|
|
height: height != null ? height : MediaQuery.of(context).orientation == Orientation.portrait
|
|
|
|
height: height != null
|
|
|
|
|
|
|
|
? height
|
|
|
|
|
|
|
|
: MediaQuery.of(context).orientation == Orientation.portrait
|
|
|
|
? MediaQuery.of(context).size.height * 0.17
|
|
|
|
? MediaQuery.of(context).size.height * 0.17
|
|
|
|
: MediaQuery.of(context).size.height * 0.35,
|
|
|
|
: MediaQuery.of(context).size.height * 0.35,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
@ -809,8 +861,10 @@ class DashboardItem extends StatelessWidget {
|
|
|
|
? DecorationImage(
|
|
|
|
? DecorationImage(
|
|
|
|
image: ExactAssetImage('assets/images/$imageName'),
|
|
|
|
image: ExactAssetImage('assets/images/$imageName'),
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
colorFilter: hasColorFilter ? new ColorFilter.mode(
|
|
|
|
colorFilter: hasColorFilter
|
|
|
|
Colors.black.withOpacity(0.2), BlendMode.dstIn) : null,
|
|
|
|
? new ColorFilter.mode(
|
|
|
|
|
|
|
|
Colors.black.withOpacity(0.2), BlendMode.dstIn)
|
|
|
|
|
|
|
|
: null,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: null,
|
|
|
|
: null,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|