@ -1,11 +1,10 @@
import ' package:diplomaticquarterapp/config/config.dart ' ;
import ' package:diplomaticquarterapp/config/shared_pref_kay.dart ' ;
import ' package:diplomaticquarterapp/config/size_config.dart ' ;
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/pharmacyModule/pharmacy_module_view_model.dart ' ;
import ' package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_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/locator.dart ' ;
import ' package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart ' ;
import ' package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart ' ;
import ' package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_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 ' ;
@ -21,7 +20,6 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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 ' ;
import ' package:feather_icons_flutter/feather_icons_flutter.dart ' ;
import ' package:flutter/cupertino.dart ' ;
import ' package:flutter/cupertino.dart ' ;
import ' package:flutter/material.dart ' ;
import ' package:flutter/material.dart ' ;
import ' package:flutter_svg/flutter_svg.dart ' ;
import ' package:flutter_svg/flutter_svg.dart ' ;
@ -64,8 +62,7 @@ class _HomePageState extends State<HomePage> {
width: double . infinity ,
width: double . infinity ,
height: 210 ,
height: 210 ,
decoration: BoxDecoration (
decoration: BoxDecoration (
image: DecorationImage (
image: DecorationImage ( image: ExactAssetImage ( ' assets/images/dashboard_top_bg.png ' ) , fit: BoxFit . cover ) ,
image: ExactAssetImage ( ' assets/images/dashboard_top_bg.png ' ) , fit: BoxFit . cover ) ,
) ,
) ,
child: Stack (
child: Stack (
children: < Widget > [
children: < Widget > [
@ -84,8 +81,7 @@ class _HomePageState extends State<HomePage> {
margin: EdgeInsets . all ( 5 ) ,
margin: EdgeInsets . all ( 5 ) ,
decoration: BoxDecoration (
decoration: BoxDecoration (
image: DecorationImage (
image: DecorationImage (
image:
image: AssetImage ( " assets/images/new-design/covid_bg_transparent.png " ) ,
AssetImage ( " assets/images/new-design/covid_bg_transparent.png " ) ,
fit: BoxFit . fill ,
fit: BoxFit . fill ,
) ,
) ,
color: Colors . white . withOpacity ( 0.3 ) ,
color: Colors . white . withOpacity ( 0.3 ) ,
@ -115,10 +111,7 @@ class _HomePageState extends State<HomePage> {
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 ' , width: 45.0 , height: 45.0 ) ,
' assets/images/new-design/covid-19-car.svg ' ,
width: 45.0 ,
height: 45.0 ) ,
) ,
) ,
Container (
Container (
margin: EdgeInsets . only ( top: 5.0 ) ,
margin: EdgeInsets . only ( top: 5.0 ) ,
@ -140,12 +133,11 @@ class _HomePageState extends State<HomePage> {
textColor: Colors . white ,
textColor: Colors . white ,
disabledTextColor: Colors . white ,
disabledTextColor: Colors . white ,
disabledColor: new Color ( 0xFFbcc2c4 ) ,
disabledColor: new Color ( 0xFFbcc2c4 ) ,
onPressed:
onPressed: ( model . user ! = null & & model . user . outSA = = 1 )
( model . user ! = null & & model . user . outSA = = 1 )
? ( ) { }
? ( ) { }
: ( ) {
: ( ) {
navigateToCovidDriveThru ( ) ;
navigateToCovidDriveThru ( ) ;
} ,
} ,
child: Center (
child: Center (
child: Center (
child: Center (
child: Center (
child: Center (
@ -177,13 +169,9 @@ class _HomePageState extends State<HomePage> {
height: 125 ,
height: 125 ,
padding: EdgeInsets . all ( 15 ) ,
padding: EdgeInsets . all ( 15 ) ,
margin: EdgeInsets . all ( 5 ) ,
margin: EdgeInsets . all ( 5 ) ,
decoration: BoxDecoration (
decoration: BoxDecoration ( color: Colors . white . withOpacity ( 0.3 ) , borderRadius: BorderRadius . all ( Radius . circular ( 5 ) ) ) ,
color: Colors . white . withOpacity ( 0.3 ) ,
borderRadius: BorderRadius . all ( Radius . circular ( 5 ) ) ) ,
child: SvgPicture . asset (
child: SvgPicture . asset (
projectViewModel . isArabic
projectViewModel . isArabic ? ' assets/images/new-design/livecare_arabic_logo.svg ' : ' assets/images/new-design/liveCare_white_logo.svg ' ,
? ' assets/images/new-design/livecare_arabic_logo.svg '
: ' assets/images/new-design/liveCare_white_logo.svg ' ,
) ,
) ,
) ,
) ,
) ,
) ,
@ -200,10 +188,8 @@ class _HomePageState extends State<HomePage> {
) ,
) ,
Positioned (
Positioned (
top: 155 ,
top: 155 ,
left: MediaQuery . of ( context ) . size . width *
left: 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 ) ,
right: MediaQuery . of ( context ) . size . width *
( MediaQuery . of ( context ) . orientation = = Orientation . landscape ? 0.02 : 0.03 ) ,
child: ( ! model . isLogin )
child: ( ! model . isLogin )
? Container (
? Container (
width: double . infinity ,
width: double . infinity ,
@ -213,8 +199,7 @@ class _HomePageState extends State<HomePage> {
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 ( Radius . circular ( 9 ) ) ,
borderRadius: BorderRadius . all ( Radius . circular ( 9 ) ) ,
image: DecorationImage (
image: DecorationImage ( image: ExactAssetImage ( ' assets/images/bg_graphic.png ' ) , fit: BoxFit . cover ) ) ,
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 (
@ -235,8 +220,7 @@ class _HomePageState extends State<HomePage> {
fontSize: 16 ,
fontSize: 16 ,
) ,
) ,
Align (
Align (
alignment:
alignment: projectViewModel . isArabic ? Alignment . bottomLeft : Alignment . bottomRight ,
projectViewModel . isArabic ? Alignment . bottomLeft : Alignment . bottomRight ,
child: InkWell (
child: InkWell (
onTap: ( ) {
onTap: ( ) {
widget . goToMyProfile ( ) ;
widget . goToMyProfile ( ) ;
@ -274,8 +258,7 @@ class _HomePageState extends State<HomePage> {
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 ( Radius . circular ( 9 ) ) ,
borderRadius: BorderRadius . all ( Radius . circular ( 9 ) ) ,
image: DecorationImage (
image: DecorationImage ( image: ExactAssetImage ( ' assets/images/bg_graphic.png ' ) , fit: BoxFit . cover ) ,
image: ExactAssetImage ( ' assets/images/bg_graphic.png ' ) , fit: BoxFit . cover ) ,
) ,
) ,
child: Container (
child: Container (
margin: EdgeInsets . all ( 5 ) ,
margin: EdgeInsets . all ( 5 ) ,
@ -302,8 +285,7 @@ class _HomePageState extends State<HomePage> {
) ,
) ,
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 " ) ,
) ,
) ,
] ,
] ,
)
)
@ -318,8 +300,7 @@ class _HomePageState extends State<HomePage> {
) ,
) ,
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/pending.svg " ) ,
" assets/images/new-design/pending.svg " ) ,
) ,
) ,
] ,
] ,
)
)
@ -407,8 +388,7 @@ class _HomePageState extends State<HomePage> {
width: 25 ,
width: 25 ,
height: 40 ,
height: 40 ,
) ,
) ,
Texts ( ' ${ model . weightKg } ${ TranslationBase . of ( context ) . kg } ' ,
Texts ( ' ${ model . weightKg } ${ TranslationBase . of ( context ) . kg } ' , color: Colors . white , fontSize: 17 )
color: Colors . white , fontSize: 17 )
] ,
] ,
) ,
) ,
) ,
) ,
@ -465,9 +445,7 @@ class _HomePageState extends State<HomePage> {
) ,
) ,
) ,
) ,
) ,
) ,
if ( projectViewModel . havePrivilege ( 64 ) | |
if ( projectViewModel . havePrivilege ( 64 ) | | projectViewModel . havePrivilege ( 65 ) | | projectViewModel . havePrivilege ( 67 ) )
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 (
@ -487,9 +465,7 @@ class _HomePageState extends State<HomePage> {
} ,
} ,
child: Center (
child: Center (
child: Padding (
child: Padding (
padding: ( model . user ! = null & & model . user . outSA = = 1 )
padding: ( model . user ! = null & & model . user . outSA = = 1 ) ? const EdgeInsets . all ( 0.0 ) : const EdgeInsets . all ( 15.0 ) ,
? const EdgeInsets . all ( 0.0 )
: const EdgeInsets . all ( 15.0 ) ,
child: ( model . user ! = null & & model . user . outSA = = 1 )
child: ( model . user ! = null & & model . user . outSA = = 1 )
? Container (
? Container (
width: double . infinity ,
width: double . infinity ,
@ -526,13 +502,10 @@ class _HomePageState extends State<HomePage> {
) ,
) ,
if ( projectViewModel . havePrivilege ( 65 ) )
if ( projectViewModel . havePrivilege ( 65 ) )
DashboardItem (
DashboardItem (
onTap: ( ) = >
onTap: ( ) = > ( model . user ! = null & & model . user . outSA = = 1 ) ? ( ) { } : getPharmacyToken ( model ) ,
( model . user ! = null & & model . user . outSA = = 1 ) ? ( ) { } : getPharmacyToken ( model ) ,
child: Center (
child: Center (
child: Padding (
child: Padding (
padding: ( model . user ! = null & & model . user . outSA = = 1 )
padding: ( model . user ! = null & & model . user . outSA = = 1 ) ? const EdgeInsets . all ( 0.0 ) : const EdgeInsets . all ( 15.0 ) ,
? const EdgeInsets . all ( 0.0 )
: const EdgeInsets . all ( 15.0 ) ,
child: ( model . user ! = null & & model . user . outSA = = 1 )
child: ( model . user ! = null & & model . user . outSA = = 1 )
? Container (
? Container (
width: double . infinity ,
width: double . infinity ,
@ -587,9 +560,7 @@ class _HomePageState extends State<HomePage> {
} ,
} ,
child: Center (
child: Center (
child: Padding (
child: Padding (
padding: ( model . user ! = null & & model . user . outSA = = 1 )
padding: ( model . user ! = null & & model . user . outSA = = 1 ) ? const EdgeInsets . all ( 0.0 ) : const EdgeInsets . all ( 15.0 ) ,
? const EdgeInsets . all ( 0.0 )
: const EdgeInsets . all ( 15.0 ) ,
child: ( model . user ! = null & & model . user . outSA = = 1 )
child: ( model . user ! = null & & model . user . outSA = = 1 )
? Container (
? Container (
width: double . infinity ,
width: double . infinity ,
@ -630,14 +601,14 @@ class _HomePageState extends State<HomePage> {
SizedBox (
SizedBox (
height: 8 ,
height: 8 ,
) ,
) ,
InkWell (
Container (
onTap: ( ) = > Navigator . push ( context , FadePage ( page: PaymentService ( ) ) ) ,
margin: EdgeInsets . only ( left: 15 , right: 15 ) ,
child: Container (
child: Row (
ma rgin: EdgeInsets . only ( left: 15 , right: 15 ) ,
ma inAxisAlignment: MainAxisAlignment . spaceBetween ,
child : Row (
child ren: < Widget > [
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
InkWell (
children: < Widget > [
onTap: ( ) = > Navigator . push ( context , FadePage ( page: PaymentService ( ) ) ) ,
Container (
child: Container (
width: MediaQuery . of ( context ) . size . width * 0.29 ,
width: MediaQuery . of ( context ) . size . width * 0.29 ,
child: Center (
child: Center (
child: Padding (
child: Padding (
@ -668,7 +639,12 @@ class _HomePageState extends State<HomePage> {
color: Colors . white ,
color: Colors . white ,
) ,
) ,
) ,
) ,
Container (
) ,
InkWell (
onTap: ( ) {
Navigator . push ( context , FadePage ( page: EReferralPage ( ) ) ) ;
} ,
child: Container (
child: Center (
child: Center (
child: Padding (
child: Padding (
padding: const EdgeInsets . all ( 15.0 ) ,
padding: const EdgeInsets . all ( 15.0 ) ,
@ -683,7 +659,7 @@ class _HomePageState extends State<HomePage> {
height: 10 ,
height: 10 ,
) ,
) ,
Texts (
Texts (
TranslationBase . of ( context ) . offersAndPackages ,
TranslationBase . of ( context ) . ereferral ,
textAlign: TextAlign . center ,
textAlign: TextAlign . center ,
color: Colors . black87 ,
color: Colors . black87 ,
bold: false ,
bold: false ,
@ -699,51 +675,52 @@ 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 (
if ( projectViewModel . havePrivilege ( 60 ) )
width: MediaQuery . of ( context ) . size . width * 0.29 ,
Container (
child: InkWell (
width: MediaQuery . of ( context ) . size . width * 0.29 ,
onTap: ( ) = > Navigator . push (
child: InkWell (
context ,
onTap: ( ) = > Navigator . push (
FadePage (
context ,
page: ErOptions (
FadePage (
isAppbar: true ,
page: ErOptions (
) ) ) ,
isAppbar: true ,
child: Center (
) ) ) ,
child: Padding (
child: Center (
padding: const EdgeInsets . all ( 15.0 ) ,
child: Padding (
child: Column (
padding: const EdgeInsets . all ( 15.0 ) ,
children: < Widget > [
child: Column (
Image . asset (
children: < Widget > [
' assets/images/Dr_Schedule_report.png ' ,
Image . asset (
width: 50 ,
' assets/images/Dr_Schedule_report.png ' ,
height : 50 ,
width : 50 ,
) ,
height: 50 ,
SizedBox (
) ,
height: 10 ,
SizedBox (
) ,
height: 10 ,
Texts (
) ,
TranslationBase . of ( context ) . emergencyServices ,
Texts (
textAlign: TextAlign . center ,
TranslationBase . of ( context ) . emergencyServices ,
color: Colors . black87 ,
textAlign: TextAlign . center ,
bold: false ,
color: Colors . black87 ,
fontSize: SizeConfig . textMultiplier * 1.7 ,
bold: false ,
)
fontSize: SizeConfig . textMultiplier * 1.7 ,
],
)
) ,
] ,
) ,
) ,
) ,
) ,
) ,
) ,
height: MediaQuery . of ( context ) . size . width * 0.4 ,
decoration: BoxDecoration (
borderRadius: BorderRadius . circular ( 6.0 ) ,
color: Colors . white ,
) ,
) ,
) ,
] ,
height: MediaQuery . of ( context ) . size . width * 0.4 ,
) ,
decoration: BoxDecoration (
borderRadius: BorderRadius . circular ( 6.0 ) ,
color: Colors . white ,
) ,
) ,
] ,
) ,
) ,
) ,
) ,
/ / ) ,
SizedBox (
SizedBox (
height: 5 ,
height: 5 ,
) ,
) ,
@ -867,17 +844,7 @@ class _HomePageState extends State<HomePage> {
}
}
class DashboardItem extends StatelessWidget {
class DashboardItem extends StatelessWidget {
const DashboardItem (
const DashboardItem ( { this . hasBorder = false , this . imageName , @ required this . child , this . onTap , Key key , this . width , this . height , this . color , this . opacity = 0.4 , this . hasColorFilter = true } )
{ this . hasBorder = false ,
this . imageName ,
@ required this . child ,
this . onTap ,
Key key ,
this . width ,
this . height ,
this . color ,
this . opacity = 0.4 ,
this . hasColorFilter = true } )
: super ( key: key ) ;
: super ( key: key ) ;
final bool hasBorder ;
final bool hasBorder ;
final String imageName ;
final String imageName ;
@ -907,15 +874,12 @@ 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: hasBorder ? Border . all ( width: 1.0 , color: const Color ( 0xffcccccc ) ) : Border . all ( width: 0.0 , color: Colors . transparent ) ,
? 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:
colorFilter: hasColorFilter ? new ColorFilter . mode ( Colors . black . withOpacity ( 0.2 ) , BlendMode . dstIn ) : null ,
hasColorFilter ? new ColorFilter . mode ( Colors . black . withOpacity ( 0.2 ) , BlendMode . dstIn ) : null ,
)
)
: null ,
: null ,
) ,
) ,