|
|
|
@ -1,12 +1,6 @@
|
|
|
|
import 'package:diplomaticquarterapp/config/size_config.dart';
|
|
|
|
import 'package:diplomaticquarterapp/config/size_config.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/model/geofencing/requests/GeoZonesRequestModel.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/core/model/geofencing/requests/LogGeoZoneRequestModel.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/core/service/geofencing/GeofencingServices.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/locator.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_index_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_index_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';
|
|
|
|
@ -17,12 +11,9 @@ 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/pages/pharmacies/screens/pharmacy_module_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/HMG_Geofence.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/buttons/button.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/offers_packages/offers_packages.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/cupertino.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
@ -31,10 +22,6 @@ import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
|
|
|
|
|
|
|
|
import '../../widgets/data_display/medical/LabResult/LineChartCurved.dart';
|
|
|
|
|
|
|
|
import '../../locator.dart';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class HomePage extends StatefulWidget {
|
|
|
|
class HomePage extends StatefulWidget {
|
|
|
|
final Function goToMyProfile;
|
|
|
|
final Function goToMyProfile;
|
|
|
|
|
|
|
|
|
|
|
|
@ -45,15 +32,9 @@ class HomePage extends StatefulWidget {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class _HomePageState extends State<HomePage> {
|
|
|
|
class _HomePageState extends State<HomePage> {
|
|
|
|
ToDoCountProviderModel toDoProvider;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AuthenticatedUserObject authenticatedUserObject =
|
|
|
|
|
|
|
|
locator<AuthenticatedUserObject>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
|
|
|
|
|
|
|
|
return BaseView<DashboardViewModel>(
|
|
|
|
return BaseView<DashboardViewModel>(
|
|
|
|
onModelReady: (model) => model.getPatientRadOrders(),
|
|
|
|
onModelReady: (model) => model.getPatientRadOrders(),
|
|
|
|
builder: (_, model, wi) => AppScaffold(
|
|
|
|
builder: (_, model, wi) => AppScaffold(
|
|
|
|
@ -72,7 +53,10 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
width: double.infinity,
|
|
|
|
width: double.infinity,
|
|
|
|
height: 210,
|
|
|
|
height: 210,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
image: DecorationImage(image: ExactAssetImage('assets/images/dashboard_top_bg.png'), fit: BoxFit.cover),
|
|
|
|
image: DecorationImage(
|
|
|
|
|
|
|
|
image: ExactAssetImage(
|
|
|
|
|
|
|
|
'assets/images/dashboard_top_bg.png'),
|
|
|
|
|
|
|
|
fit: BoxFit.cover),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Stack(
|
|
|
|
child: Stack(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
@ -81,7 +65,8 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
left: 5,
|
|
|
|
left: 5,
|
|
|
|
right: 5,
|
|
|
|
right: 5,
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
width: MediaQuery.of(context).size.width * 0.8,
|
|
|
|
width:
|
|
|
|
|
|
|
|
MediaQuery.of(context).size.width * 0.8,
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
@ -91,42 +76,81 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
image: DecorationImage(
|
|
|
|
image: DecorationImage(
|
|
|
|
image: AssetImage("assets/images/new-design/covid_bg_transparent.png"),
|
|
|
|
image: AssetImage(
|
|
|
|
|
|
|
|
"assets/images/new-design/covid_bg_transparent.png"),
|
|
|
|
fit: BoxFit.fill,
|
|
|
|
fit: BoxFit.fill,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
color: Colors.white.withOpacity(0.3),
|
|
|
|
color:
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(5))),
|
|
|
|
Colors.white.withOpacity(0.3),
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
|
|
|
Radius.circular(5))),
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Text("COVID-19 TEST", style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 18.0)),
|
|
|
|
Text("COVID-19 TEST",
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
fontWeight:
|
|
|
|
|
|
|
|
FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 18.0)),
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(top: 15.0, left: 3.5, right: 3.5),
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
child: SvgPicture.asset('assets/images/new-design/covid-19-car.svg', width: 45.0, height: 45.0),
|
|
|
|
top: 15.0, left: 3.5, right: 3.5),
|
|
|
|
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
|
|
|
|
'assets/images/new-design/covid-19-car.svg',
|
|
|
|
|
|
|
|
width: 45.0,
|
|
|
|
|
|
|
|
height: 45.0),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(left: 10.0, top: 10.0),
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
|
|
|
left: 10.0,
|
|
|
|
|
|
|
|
top: 10.0),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Text("Drive-Thru", style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 16.0)),
|
|
|
|
Text("Drive-Thru",
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: Colors
|
|
|
|
|
|
|
|
.white,
|
|
|
|
|
|
|
|
fontWeight:
|
|
|
|
|
|
|
|
FontWeight
|
|
|
|
|
|
|
|
.bold,
|
|
|
|
|
|
|
|
fontSize:
|
|
|
|
|
|
|
|
16.0)),
|
|
|
|
ButtonTheme(
|
|
|
|
ButtonTheme(
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
shape:
|
|
|
|
borderRadius: BorderRadius.circular(5.0),
|
|
|
|
RoundedRectangleBorder(
|
|
|
|
),
|
|
|
|
borderRadius:
|
|
|
|
minWidth: MediaQuery.of(context).size.width * 0.15,
|
|
|
|
BorderRadius
|
|
|
|
|
|
|
|
.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: Text("BOOK NOW", style: TextStyle(fontSize: 12.0)),
|
|
|
|
child: Text(
|
|
|
|
|
|
|
|
"BOOK NOW",
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize:
|
|
|
|
|
|
|
|
12.0)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -141,14 +165,21 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: InkWell(
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () => Navigator.push(context, FadePage(page: LiveCareHome())),
|
|
|
|
onTap: () => Navigator.push(context,
|
|
|
|
|
|
|
|
FadePage(page: LiveCareHome())),
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
height: 120,
|
|
|
|
height: 120,
|
|
|
|
padding: EdgeInsets.all(15),
|
|
|
|
padding: EdgeInsets.all(15),
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
decoration: BoxDecoration(color: Colors.white.withOpacity(0.3), borderRadius: BorderRadius.all(Radius.circular(5))),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
|
|
color: Colors.white
|
|
|
|
|
|
|
|
.withOpacity(0.3),
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
|
|
|
Radius.circular(5))),
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
projectViewModel.isArabic ? 'assets/images/new-design/livecare_arabic_logo.svg' : 'assets/images/new-design/liveCare_white_logo.svg',
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
|
|
|
? 'assets/images/new-design/livecare_arabic_logo.svg'
|
|
|
|
|
|
|
|
: 'assets/images/new-design/liveCare_white_logo.svg',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -159,15 +190,22 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(width: double.infinity, height: 80)
|
|
|
|
Container(width: double.infinity, height: 80)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
Positioned(
|
|
|
|
top: 155,
|
|
|
|
top: 155,
|
|
|
|
left: MediaQuery.of(context).size.width * (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03),
|
|
|
|
left: MediaQuery.of(context).size.width *
|
|
|
|
right: MediaQuery.of(context).size.width * (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03),
|
|
|
|
(MediaQuery.of(context).orientation ==
|
|
|
|
|
|
|
|
Orientation.landscape
|
|
|
|
|
|
|
|
? 0.02
|
|
|
|
|
|
|
|
: 0.03),
|
|
|
|
|
|
|
|
right: MediaQuery.of(context).size.width *
|
|
|
|
|
|
|
|
(MediaQuery.of(context).orientation ==
|
|
|
|
|
|
|
|
Orientation.landscape
|
|
|
|
|
|
|
|
? 0.02
|
|
|
|
|
|
|
|
: 0.03),
|
|
|
|
child: (!model.isLogin && projectViewModel.user == null)
|
|
|
|
child: (!model.isLogin && projectViewModel.user == null)
|
|
|
|
? Container(
|
|
|
|
? Container(
|
|
|
|
width: double.infinity,
|
|
|
|
width: double.infinity,
|
|
|
|
@ -175,9 +213,14 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: HexColor('#A59E9E'),
|
|
|
|
color: HexColor('#A59E9E'),
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
border: Border.all(color: Colors.transparent, width: 0.5),
|
|
|
|
border: Border.all(
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(9)),
|
|
|
|
color: Colors.transparent, width: 0.5),
|
|
|
|
image: DecorationImage(image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover)),
|
|
|
|
borderRadius:
|
|
|
|
|
|
|
|
BorderRadius.all(Radius.circular(9)),
|
|
|
|
|
|
|
|
image: DecorationImage(
|
|
|
|
|
|
|
|
image: ExactAssetImage(
|
|
|
|
|
|
|
|
'assets/images/bg_graphic.png'),
|
|
|
|
|
|
|
|
fit: BoxFit.cover)),
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
@ -196,12 +239,15 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
height: 5,
|
|
|
|
height: 5,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Texts(
|
|
|
|
Texts(
|
|
|
|
TranslationBase.of(context).myMedicalFileSubTitle,
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
|
|
|
.myMedicalFileSubTitle,
|
|
|
|
color: Colors.black,
|
|
|
|
color: Colors.black,
|
|
|
|
fontSize: 16,
|
|
|
|
fontSize: 16,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Align(
|
|
|
|
Align(
|
|
|
|
alignment: projectViewModel.isArabic ? Alignment.bottomRight : Alignment.bottomLeft,
|
|
|
|
alignment: projectViewModel.isArabic
|
|
|
|
|
|
|
|
? Alignment.bottomRight
|
|
|
|
|
|
|
|
: Alignment.bottomLeft,
|
|
|
|
child: InkWell(
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
widget.goToMyProfile();
|
|
|
|
widget.goToMyProfile();
|
|
|
|
@ -213,12 +259,16 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: HexColor('#D81A2E'),
|
|
|
|
color: HexColor('#D81A2E'),
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
border: Border.all(color: Colors.transparent, width: 0.5),
|
|
|
|
border: Border.all(
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(9)),
|
|
|
|
color: Colors.transparent,
|
|
|
|
|
|
|
|
width: 0.5),
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
|
|
|
Radius.circular(9)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Center(
|
|
|
|
child: Center(
|
|
|
|
child: Texts(
|
|
|
|
child: Texts(
|
|
|
|
TranslationBase.of(context).viewMore,
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
|
|
|
.viewMore,
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
fontSize: 12,
|
|
|
|
fontSize: 12,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -236,9 +286,14 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: HexColor('#A59E9E'),
|
|
|
|
color: HexColor('#A59E9E'),
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
border: Border.all(color: Colors.transparent, width: 0.5),
|
|
|
|
border: Border.all(
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(9)),
|
|
|
|
color: Colors.transparent, width: 0.5),
|
|
|
|
image: DecorationImage(image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover),
|
|
|
|
borderRadius:
|
|
|
|
|
|
|
|
BorderRadius.all(Radius.circular(9)),
|
|
|
|
|
|
|
|
image: DecorationImage(
|
|
|
|
|
|
|
|
image: ExactAssetImage(
|
|
|
|
|
|
|
|
'assets/images/bg_graphic.png'),
|
|
|
|
|
|
|
|
fit: BoxFit.cover),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
@ -249,13 +304,16 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
if (model.user != null)
|
|
|
|
if (model.user != null)
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 8,
|
|
|
|
height: 8,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Texts(
|
|
|
|
Texts(
|
|
|
|
model.user.firstName + " " + model.user.lastName,
|
|
|
|
model.user.firstName +
|
|
|
|
|
|
|
|
" " +
|
|
|
|
|
|
|
|
model.user.lastName,
|
|
|
|
color: Colors.grey[100],
|
|
|
|
color: Colors.grey[100],
|
|
|
|
bold: true,
|
|
|
|
bold: true,
|
|
|
|
fontSize: 15,
|
|
|
|
fontSize: 15,
|
|
|
|
@ -288,14 +346,17 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: HexColor('#D81A2E'),
|
|
|
|
color: HexColor('#D81A2E'),
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
border: Border.all(color: Colors.transparent, width: 0.5),
|
|
|
|
border: Border.all(
|
|
|
|
|
|
|
|
color: Colors.transparent,
|
|
|
|
|
|
|
|
width: 0.5),
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(5),
|
|
|
|
Radius.circular(5),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Center(
|
|
|
|
child: Center(
|
|
|
|
child: Texts(
|
|
|
|
child: Texts(
|
|
|
|
TranslationBase.of(context).viewMore,
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
|
|
|
.viewMore,
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
fontSize: 12,
|
|
|
|
fontSize: 12,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -310,7 +371,8 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Image.asset(
|
|
|
|
Image.asset(
|
|
|
|
'assets/images/height_icon.png',
|
|
|
|
'assets/images/height_icon.png',
|
|
|
|
@ -329,7 +391,8 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Image.asset(
|
|
|
|
Image.asset(
|
|
|
|
'assets/images/weight_icon.png',
|
|
|
|
'assets/images/weight_icon.png',
|
|
|
|
@ -348,7 +411,8 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Image.asset(
|
|
|
|
Image.asset(
|
|
|
|
'assets/images/blood_icon.png',
|
|
|
|
'assets/images/blood_icon.png',
|
|
|
|
@ -356,7 +420,7 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
height: 40,
|
|
|
|
height: 40,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Texts(
|
|
|
|
Texts(
|
|
|
|
'${model.bloadType}',
|
|
|
|
'${model.booldType}',
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -371,16 +435,13 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
if(projectViewModel.havePrivilege(64)||projectViewModel.havePrivilege(65)||projectViewModel.havePrivilege(67))
|
|
|
|
/* Zohiab Kambrani | Commented below because its in progress
|
|
|
|
|
|
|
|
OffersAndPackagesWidget(OfferPackagesItemModel.dummy()),
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(left: 15, right: 15),
|
|
|
|
margin: EdgeInsets.only(left: 15, right: 15),
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
if(projectViewModel.havePrivilege(64))
|
|
|
|
DashboardItem(
|
|
|
|
DashboardItem(
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
Navigator.push(
|
|
|
|
Navigator.push(
|
|
|
|
@ -404,7 +465,8 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
height: 3,
|
|
|
|
height: 3,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Texts(
|
|
|
|
Texts(
|
|
|
|
TranslationBase.of(context).homeHealthCareService,
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
|
|
|
.homeHealthCareService,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
bold: true,
|
|
|
|
bold: true,
|
|
|
|
@ -418,8 +480,10 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
imageName: 'home_healthcare_service_bg.png',
|
|
|
|
imageName: 'home_healthcare_service_bg.png',
|
|
|
|
opacity: 0.5,
|
|
|
|
opacity: 0.5,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
if(projectViewModel.havePrivilege(65))
|
|
|
|
DashboardItem(
|
|
|
|
DashboardItem(
|
|
|
|
onTap: () => Navigator.push(context, FadePage(page: PharmacyPage())),
|
|
|
|
onTap: () => Navigator.push(context, FadePage(page: PharmacyPage())),
|
|
|
|
|
|
|
|
|
|
|
|
child: Center(
|
|
|
|
child: Center(
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.all(15.0),
|
|
|
|
padding: const EdgeInsets.all(15.0),
|
|
|
|
@ -447,8 +511,9 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
height: MediaQuery.of(context).size.width * 0.4,
|
|
|
|
height: MediaQuery.of(context).size.width * 0.4,
|
|
|
|
imageName: 'al-habib_onlne_pharmacy_bg.png',
|
|
|
|
imageName: 'al-habib_onlne_pharmacy_bg.png',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
if(projectViewModel.havePrivilege(67))
|
|
|
|
DashboardItem(
|
|
|
|
DashboardItem(
|
|
|
|
onTap: () {
|
|
|
|
onTap: (){
|
|
|
|
Navigator.push(
|
|
|
|
Navigator.push(
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
FadePage(
|
|
|
|
FadePage(
|
|
|
|
@ -491,7 +556,8 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
height: 8,
|
|
|
|
height: 8,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
InkWell(
|
|
|
|
InkWell(
|
|
|
|
onTap: () => Navigator.push(context, FadePage(page: PaymentService())),
|
|
|
|
onTap: () =>
|
|
|
|
|
|
|
|
Navigator.push(context, FadePage(page: PaymentService())),
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
margin: EdgeInsets.only(left: 15, right: 15),
|
|
|
|
margin: EdgeInsets.only(left: 15, right: 15),
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
@ -512,7 +578,8 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
height: 5,
|
|
|
|
height: 5,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Texts(
|
|
|
|
Texts(
|
|
|
|
TranslationBase.of(context).onlinePaymentService,
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
|
|
|
.onlinePaymentService,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
color: Colors.black87,
|
|
|
|
color: Colors.black87,
|
|
|
|
bold: false,
|
|
|
|
bold: false,
|
|
|
|
@ -543,7 +610,8 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
height: 10,
|
|
|
|
height: 10,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Texts(
|
|
|
|
Texts(
|
|
|
|
TranslationBase.of(context).offersAndPackages,
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
|
|
|
.offersAndPackages,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
color: Colors.black87,
|
|
|
|
color: Colors.black87,
|
|
|
|
bold: false,
|
|
|
|
bold: false,
|
|
|
|
@ -559,6 +627,7 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
borderRadius: BorderRadius.circular(6.0),
|
|
|
|
borderRadius: BorderRadius.circular(6.0),
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
)),
|
|
|
|
)),
|
|
|
|
|
|
|
|
if(projectViewModel.havePrivilege(60))
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
width: MediaQuery.of(context).size.width * 0.29,
|
|
|
|
width: MediaQuery.of(context).size.width * 0.29,
|
|
|
|
child: InkWell(
|
|
|
|
child: InkWell(
|
|
|
|
@ -582,7 +651,8 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
height: 10,
|
|
|
|
height: 10,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Texts(
|
|
|
|
Texts(
|
|
|
|
TranslationBase.of(context).emergencyServices,
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
|
|
|
.emergencyServices,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
color: Colors.black87,
|
|
|
|
color: Colors.black87,
|
|
|
|
bold: false,
|
|
|
|
bold: false,
|
|
|
|
@ -624,7 +694,8 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Texts(
|
|
|
|
Texts(
|
|
|
|
TranslationBase.of(context).viewAllHabibMedicalService,
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
|
|
|
.viewAllHabibMedicalService,
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
fontSize: 10,
|
|
|
|
fontSize: 10,
|
|
|
|
@ -645,14 +716,15 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
opacity: 0.5,
|
|
|
|
opacity: 0.5,
|
|
|
|
color: Colors.grey[700],
|
|
|
|
color: Colors.grey[700],
|
|
|
|
width: MediaQuery.of(context).size.width * 0.45,
|
|
|
|
width: MediaQuery.of(context).size.width * 0.45,
|
|
|
|
onTap: () => Navigator.push(context, FadePage(page: AllHabibMedicalService(
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
))),
|
|
|
|
context, FadePage(page: AllHabibMedicalService())),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
DashboardItem(
|
|
|
|
DashboardItem(
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
// Navigator.push(
|
|
|
|
// Navigator.push(
|
|
|
|
// context, FadePage(page: FeedbackHomePage()));
|
|
|
|
// context, FadePage(page: FeedbackHomePage()));
|
|
|
|
Navigator.push(context, FadePage(page: ContactUsPage()));
|
|
|
|
Navigator.push(
|
|
|
|
|
|
|
|
context, FadePage(page: ContactUsPage()));
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
width: double.infinity,
|
|
|
|
@ -675,7 +747,7 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
child: Container(),
|
|
|
|
child: Container(),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Texts(
|
|
|
|
Texts(
|
|
|
|
TranslationBase.of(context).viewAll,
|
|
|
|
TranslationBase.of(context).viewMore,
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
@ -692,7 +764,7 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 130,
|
|
|
|
height: 120,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -703,7 +775,8 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
navigateToCovidDriveThru() {
|
|
|
|
navigateToCovidDriveThru() {
|
|
|
|
Navigator.push(context, MaterialPageRoute(builder: (context) => CovidDrivethruLocation()));
|
|
|
|
Navigator.push(context,
|
|
|
|
|
|
|
|
MaterialPageRoute(builder: (context) => CovidDrivethruLocation()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -717,10 +790,8 @@ class DashboardItem extends StatelessWidget {
|
|
|
|
this.width,
|
|
|
|
this.width,
|
|
|
|
this.height,
|
|
|
|
this.height,
|
|
|
|
this.color,
|
|
|
|
this.color,
|
|
|
|
this.opacity = 1.0,
|
|
|
|
this.opacity = 0.4,
|
|
|
|
this.icon,
|
|
|
|
this.hasColorFilter = true})
|
|
|
|
this.hasColorFilter = true,
|
|
|
|
|
|
|
|
this.margin = 0})
|
|
|
|
|
|
|
|
: super(key: key);
|
|
|
|
: super(key: key);
|
|
|
|
final bool hasBorder;
|
|
|
|
final bool hasBorder;
|
|
|
|
final String imageName;
|
|
|
|
final String imageName;
|
|
|
|
@ -730,9 +801,8 @@ class DashboardItem extends StatelessWidget {
|
|
|
|
final double height;
|
|
|
|
final double height;
|
|
|
|
final Color color;
|
|
|
|
final Color color;
|
|
|
|
final double opacity;
|
|
|
|
final double opacity;
|
|
|
|
final double margin;
|
|
|
|
|
|
|
|
final Widget icon;
|
|
|
|
|
|
|
|
final bool hasColorFilter;
|
|
|
|
final bool hasColorFilter;
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return InkWell(
|
|
|
|
return InkWell(
|
|
|
|
@ -751,16 +821,18 @@ class DashboardItem extends StatelessWidget {
|
|
|
|
: HexColor('#050705').withOpacity(opacity)
|
|
|
|
: HexColor('#050705').withOpacity(opacity)
|
|
|
|
: Colors.white,
|
|
|
|
: Colors.white,
|
|
|
|
borderRadius: BorderRadius.circular(6.0),
|
|
|
|
borderRadius: BorderRadius.circular(6.0),
|
|
|
|
border: hasBorder ? Border.all(width: 1.0, color: const Color(0xffcccccc)) : Border.all(width: 0.0, color: Colors.transparent),
|
|
|
|
border: hasBorder
|
|
|
|
|
|
|
|
? Border.all(width: 1.0, color: const Color(0xffcccccc))
|
|
|
|
|
|
|
|
: Border.all(width: 0.0, color: Colors.transparent),
|
|
|
|
image: imageName != null
|
|
|
|
image: imageName != null
|
|
|
|
? DecorationImage(
|
|
|
|
? DecorationImage(
|
|
|
|
image: ExactAssetImage('assets/images/$imageName'),
|
|
|
|
image: ExactAssetImage('assets/images/$imageName'),
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
colorFilter: hasColorFilter ? new ColorFilter.mode(Colors.black.withOpacity(0.2), BlendMode.dstIn) : null,
|
|
|
|
colorFilter: hasColorFilter ? new ColorFilter.mode(
|
|
|
|
|
|
|
|
Colors.black.withOpacity(0.2), BlendMode.dstIn) : null,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: icon,
|
|
|
|
: null,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
margin: EdgeInsets.all(margin),
|
|
|
|
|
|
|
|
child: Center(
|
|
|
|
child: Center(
|
|
|
|
child: child,
|
|
|
|
child: child,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|