@ -1,6 +1,3 @@
import ' dart:math ' as math ;
import ' package:auto_size_text/auto_size_text.dart ' ;
import ' package:diplomaticquarterapp/config/size_config.dart ' ;
import ' package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart ' ;
import ' package:diplomaticquarterapp/core/viewModels/project_view_model.dart ' ;
@ -12,6 +9,7 @@ import 'package:diplomaticquarterapp/models/gradient_color.dart';
import ' package:diplomaticquarterapp/models/hmg_services.dart ' ;
import ' package:diplomaticquarterapp/models/slider_data.dart ' ;
import ' package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart ' ;
import ' package:diplomaticquarterapp/pages/ErService/ErOptions.dart ' ;
import ' package:diplomaticquarterapp/pages/landing/widgets/logged_slider_view.dart ' ;
import ' package:diplomaticquarterapp/pages/landing/widgets/services_view.dart ' ;
import ' package:diplomaticquarterapp/pages/landing/widgets/slider_view.dart ' ;
@ -354,9 +352,8 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
flex: 1 ,
child: InkWell (
onTap: ( ) {
AuthenticatedUser user = projectViewModel . user ;
if ( projectViewModel . havePrivilege ( 82 ) | | bypassPrivilageCheck ) Navigator . of ( context ) . push ( MaterialPageRoute ( builder: ( context ) = > PackagesOfferTabPage ( user ) ) ) ;
projectViewModel . analytics . offerPackages . log ( ) ;
/ / Navigator . of ( context ) . push ( MaterialPageRoute ( builder: ( context ) = > ErOptions ( isAppbar: true ) ) ) ;
Navigator . push ( context , FadePage ( page: ErOptions ( isAppbar: true ) ) ) ;
} ,
child: Stack (
children: [
@ -371,7 +368,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
width: double . infinity ,
height: double . infinity ,
/ / color: Color ( 0xFF2B353E ) ,
decoration: containerRadius ( C olor( 0xFF2B353E ) , 20 ) ,
decoration: containerRadius ( C ustomColors. accentColor , 20 ) ,
) ,
Container (
width: double . infinity ,
@ -396,9 +393,9 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
left: 20 ,
top: 12 ,
child: Opacity (
opacity: 0. 04 ,
opacity: 0. 5 ,
child: SvgPicture . asset (
" assets/images/new/ logo .svg" ,
" assets/images/new/ emergency_services_back .svg" ,
height: MediaQuery . of ( context ) . size . width * 0.14 ,
) ,
) ,
@ -407,96 +404,55 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
right: 20 ,
top: 12 ,
child: Opacity (
opacity: 0. 04 ,
opacity: 0. 5 ,
child: SvgPicture . asset (
" assets/images/new/ logo .svg" ,
" assets/images/new/ emergency_services_back .svg" ,
height: MediaQuery . of ( context ) . size . width * 0.14 ,
) ,
) ,
) ,
projectViewModel . isArabic
? Positioned (
right: - 16 ,
top: 2 ,
child: Transform . rotate (
angle: math . pi / 4 ,
child: Container (
padding: EdgeInsets . only ( left: 18 , right: 18 , top: 6 , bottom: 3 ) ,
color: CustomColors . accentColor ,
child: Text (
TranslationBase . of ( context ) . newDes ,
style: TextStyle (
color: Colors . white ,
fontSize: 9 ,
height: 0.8 ,
letterSpacing: - 0.27 ,
) ,
) ,
) ,
) ,
)
: Positioned (
left: - 16 ,
top: 2 ,
child: Transform . rotate (
angle: - math . pi / 4 ,
child: Container (
padding: EdgeInsets . only ( left: 18 , right: 18 , top: 6 , bottom: 3 ) ,
color: CustomColors . accentColor ,
child: Text (
TranslationBase . of ( context ) . newDes ,
style: TextStyle (
color: Colors . white ,
fontSize: 9 ,
letterSpacing: - 0.27 ,
height: 1.2 ,
) ,
) ,
) ,
) ,
) ,
Container (
width: double . infinity ,
height: double . infinity ,
padding: EdgeInsets . only( left: projectViewModel . isArabic ? 20 : 25 , right: projectViewModel . isArabic ? 25 : 20 ) ,
padding: EdgeInsets . all ( SizeConfig . widthMultiplier * 3.4 ) ,
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
mainAxisAlignment: MainAxisAlignment . center ,
children: [
mFlex ( 3 ) ,
AutoSizeText (
TranslationBase . of ( context ) . offersdiscount ,
maxLines: 1 ,
style: TextStyle (
color: Colors . black ,
fontSize: 14 ,
fontWeight: FontWeight . bold ,
letterSpacing: - 0.75 ,
height: 1 ,
) ,
) ,
projectViewModel . isArabic ? mHeight ( 4 ) : Container ( ) ,
Text (
TranslationBase . of ( context ) . explore ,
style: TextStyle (
color: Colors . black ,
fontSize: 9 ,
fontWeight: FontWeight . w600 ,
letterSpacing: - 0.27 ,
height: projectViewModel . isArabic ? 0.8 : 1 ,
Container (
child: SvgPicture . asset (
" assets/images/new/emergency_services.svg " ,
height: MediaQuery . of ( context ) . size . width * 0.08 ,
) ,
) ,
mFlex ( 1 ) ,
Row (
Column (
crossAxisAlignment: CrossAxisAlignment . start ,
mainAxisAlignment: MainAxisAlignment . center ,
children: [
showFloating ( " assets/images/new/ear.svg " ) ,
mWidth ( 4 ) ,
showFloating ( " assets/images/new/head.svg " ) ,
mWidth ( 4 ) ,
showFloating ( " assets/images/new/tooth.svg " ) ,
Text (
TranslationBase . of ( context ) . emergencyServices ,
style: TextStyle (
color: Colors . black ,
fontSize: 14 ,
fontWeight: FontWeight . bold ,
letterSpacing: - 0.45 ,
height: 1 ,
) ,
) ,
projectViewModel . isArabic ? mHeight ( 5 ) : Container ( ) ,
Text (
TranslationBase . of ( context ) . emergencyServicesSubtitle ,
style: TextStyle (
color: Colors . black ,
fontSize: 9 ,
fontWeight: FontWeight . w600 ,
letterSpacing: - 0.27 ,
height: projectViewModel . isArabic ? 0.2 : 1 ,
) ,
) ,
] ,
) ,
mFlex ( 2 )
] ,
) ,
) ,
@ -565,7 +521,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
left: 20 ,
top: 12 ,
child: Opacity (
opacity: 0. 04 ,
opacity: 0. 25 ,
child: SvgPicture . asset (
" assets/images/new/Pharmacy.svg " ,
height: MediaQuery . of ( context ) . size . width * 0.15 ,
@ -576,7 +532,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
right: 20 ,
top: 12 ,
child: Opacity (
opacity: 0. 04 ,
opacity: 0. 25 ,
child: SvgPicture . asset (
" assets/images/new/Pharmacy.svg " ,
height: MediaQuery . of ( context ) . size . width * 0.15 ,
@ -592,8 +548,6 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
mainAxisAlignment: MainAxisAlignment . center ,
children: [
Container (
color: Colors . yellow ,
/ / width: MediaQuery . of ( context ) . size . width * 0.065 ,
child: SvgPicture . asset (
" assets/images/new/Pharmacy.svg " ,
height: MediaQuery . of ( context ) . size . width * 0.08 ,