diff --git a/assets/images/background_home.png b/assets/images/background_home.png new file mode 100644 index 0000000..9c464bc Binary files /dev/null and b/assets/images/background_home.png differ diff --git a/assets/images/background_intro.png b/assets/images/background_intro.png deleted file mode 100644 index 2905983..0000000 Binary files a/assets/images/background_intro.png and /dev/null differ diff --git a/assets/images/khadije_logo.png b/assets/images/khadije_logo.png index 6084c38..3377d3f 100644 Binary files a/assets/images/khadije_logo.png and b/assets/images/khadije_logo.png differ diff --git a/assets/svg/button_2_tablet.svg b/assets/svg/button_2_tablet.svg new file mode 100644 index 0000000..243392e --- /dev/null +++ b/assets/svg/button_2_tablet.svg @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/common_ui/resources/my_assets.dart b/lib/common_ui/resources/my_assets.dart index d6ac0dc..3e88f68 100644 --- a/lib/common_ui/resources/my_assets.dart +++ b/lib/common_ui/resources/my_assets.dart @@ -4,7 +4,7 @@ class MyAssets { factory MyAssets() => _i; /// PNG, JPG - static const String backgroundHome = 'assets/images/background_intro.png'; + static const String backgroundHome = 'assets/images/background_home.png'; static const String hadiHoda = 'assets/images/hadi_hoda.png'; static const String khadijeLogo = 'assets/images/khadije_logo.png'; static const String pattern = 'assets/images/pattern.png'; @@ -35,6 +35,7 @@ class MyAssets { static const String button = 'assets/svg/button.svg'; static const String buttonTablet = 'assets/svg/button_tablet.svg'; static const String button2 = 'assets/svg/button_2.svg'; + static const String button2Tablet = 'assets/svg/button_2_tablet.svg'; static const String button3 = 'assets/svg/button_3.svg'; static const String theme = 'assets/svg/theme.svg'; static const String facebook = 'assets/svg/facebook.svg'; diff --git a/lib/core/widgets/about_us_dialog/about_us_dialog.dart b/lib/core/widgets/about_us_dialog/about_us_dialog.dart index ab9ccbb..e575dd9 100644 --- a/lib/core/widgets/about_us_dialog/about_us_dialog.dart +++ b/lib/core/widgets/about_us_dialog/about_us_dialog.dart @@ -4,6 +4,7 @@ import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; import 'package:hadi_hoda_flutter/common_ui/resources/my_assets.dart'; import 'package:hadi_hoda_flutter/common_ui/resources/my_colors.dart'; +import 'package:hadi_hoda_flutter/common_ui/resources/my_text_style.dart'; import 'package:hadi_hoda_flutter/core/utils/my_localization.dart'; import 'package:hadi_hoda_flutter/core/utils/set_platform_size.dart'; import 'package:hadi_hoda_flutter/core/widgets/about_us_dialog/styles/background.dart'; @@ -33,7 +34,7 @@ class AboutUsDialog extends StatelessWidget { horizontal: setSize( context: context, mobile: 18, - tablet: 120, + tablet: 160, ) ?? 0, ), child: Stack( @@ -45,16 +46,22 @@ class AboutUsDialog extends StatelessWidget { children: [ Text( context.translate.about_us, + style: MYTextStyle.titr3.copyWith( + color: Color(0XFF322386), + ), ), Text( context.translate.about_us_desc, + style: MYTextStyle.matn1.copyWith( + color: Color(0XFF494178), + ), ), MyImage( image: MyAssets.newHorizon, - size: 45, ), MyImage( image: MyAssets.khadijeLogo, + size: 100, ), Row( mainAxisAlignment: MainAxisAlignment.center, @@ -83,7 +90,7 @@ class AboutUsDialog extends StatelessWidget { ), Positioned( right: setSize(context: context, mobile: 30, tablet: 40), - top: -12, + top: setSize(context: context, mobile: -12, tablet: -20), child: GestureDetector( onTap: context.pop, behavior: HitTestBehavior.opaque, diff --git a/lib/core/widgets/about_us_dialog/styles/background.dart b/lib/core/widgets/about_us_dialog/styles/background.dart index 45803d9..2105738 100644 --- a/lib/core/widgets/about_us_dialog/styles/background.dart +++ b/lib/core/widgets/about_us_dialog/styles/background.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:hadi_hoda_flutter/common_ui/resources/my_spaces.dart'; import 'package:hadi_hoda_flutter/core/utils/screen_size.dart'; import 'package:hadi_hoda_flutter/core/utils/set_platform_size.dart'; @@ -13,13 +14,10 @@ class AboutUSDialogBackground extends StatelessWidget { clipper: _BottomShapeClipper(), child: Container( width: context.widthScreen, - height: setSize(context: context, mobile: 525, tablet: 740), - padding: EdgeInsets.all( - setSize( - context: context, - mobile: 30, - tablet: 60, - ) ?? 0, + height: 525, + padding: EdgeInsets.symmetric( + vertical: MySpaces.s30, + horizontal: setSize(context: context, mobile: MySpaces.s30, tablet: 60) ?? 0, ), decoration: const BoxDecoration( gradient: LinearGradient( diff --git a/lib/core/widgets/button/my_yellow_button.dart b/lib/core/widgets/button/my_yellow_button.dart new file mode 100644 index 0000000..b6364b4 --- /dev/null +++ b/lib/core/widgets/button/my_yellow_button.dart @@ -0,0 +1,52 @@ +import 'package:flutter/material.dart'; +import 'package:hadi_hoda_flutter/common_ui/resources/my_assets.dart'; +import 'package:hadi_hoda_flutter/common_ui/resources/my_colors.dart'; +import 'package:hadi_hoda_flutter/common_ui/resources/my_spaces.dart'; +import 'package:hadi_hoda_flutter/common_ui/resources/my_text_style.dart'; +import 'package:hadi_hoda_flutter/core/utils/set_platform_size.dart'; +import 'package:hadi_hoda_flutter/core/widgets/images/my_image.dart'; + +class MyYellowButton extends StatelessWidget { + const MyYellowButton({ + super.key, + this.onTap, + this.title, + this.top, + }); + + final VoidCallback? onTap; + final String? title; + final double? top; + + @override + Widget build(BuildContext context) { + return InkWell( + onTap: onTap, + highlightColor: MyColors.transparent, + splashColor: MyColors.transparent, + child: Stack( + alignment: Alignment.center, + children: [ + MyImage(image: + setSize( + context: context, + mobile: MyAssets.button2, + tablet: MyAssets.button2Tablet, + ) ?? + '', + ), + PositionedDirectional( + top: top ?? setSize(context: context, mobile: MySpaces.s6, tablet: MySpaces.s22), + child: Text( + title ?? '', + style: MYTextStyle.button1.copyWith( + color: Color(0XFFD93D16), + fontSize: setSize(context: context, tablet: 60), + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/features/home/presentation/ui/home_page.dart b/lib/features/home/presentation/ui/home_page.dart index 9b6490d..04338fc 100644 --- a/lib/features/home/presentation/ui/home_page.dart +++ b/lib/features/home/presentation/ui/home_page.dart @@ -4,8 +4,8 @@ import 'package:hadi_hoda_flutter/common_ui/resources/my_assets.dart'; import 'package:hadi_hoda_flutter/common_ui/resources/my_spaces.dart'; import 'package:hadi_hoda_flutter/core/utils/my_localization.dart'; import 'package:hadi_hoda_flutter/core/utils/screen_size.dart'; -import 'package:hadi_hoda_flutter/core/widgets/button/enum/button_type.dart'; -import 'package:hadi_hoda_flutter/core/widgets/button/my_button.dart'; +import 'package:hadi_hoda_flutter/core/utils/set_platform_size.dart'; +import 'package:hadi_hoda_flutter/core/widgets/button/my_yellow_button.dart'; import 'package:hadi_hoda_flutter/core/widgets/images/my_image.dart'; import 'package:hadi_hoda_flutter/features/home/presentation/bloc/home_bloc.dart'; @@ -15,7 +15,6 @@ class HomePage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - extendBodyBehindAppBar: true, body: DecoratedBox( decoration: BoxDecoration( image: DecorationImage( @@ -23,14 +22,12 @@ class HomePage extends StatelessWidget { fit: BoxFit.cover, ), ), - child: SizedBox( - width: context.widthScreen, - height: context.heightScreen, + child: SizedBox.expand( child: Stack( alignment: Alignment.center, children: [ _music(context), - _name(context), + _image(context), _bottomBtns(context), ], ), @@ -41,7 +38,7 @@ class HomePage extends StatelessWidget { Widget _music(BuildContext context) { return PositionedDirectional( - top: MediaQuery.viewPaddingOf(context).top + MySpaces.s16, + top: MySpaces.s36, end: MySpaces.s16, child: StreamBuilder( initialData: 1, @@ -50,6 +47,7 @@ class HomePage extends StatelessWidget { onTap: () => context.read().changeMute(), child: MyImage( image: snapshot.data == 1 ? MyAssets.musicOn : MyAssets.musicOff, + size: setSize(context: context, tablet: 100), ), ), ), @@ -57,20 +55,29 @@ class HomePage extends StatelessWidget { } - Positioned _name(BuildContext context) { + Positioned _image(BuildContext context) { return Positioned( - top: 146, - child: MyImage( - image: MyAssets.hadiHoda, - size: 232, - fit: BoxFit.cover, + top: setSize(context: context, mobile: 0.1.h, tablet: 0.15.h), + child: Stack( + children: [ + MyImage( + image: MyAssets.hadiHoda, + ), + PositionedDirectional( + start: MySpaces.s10, + top: MySpaces.s40, + child: MyImage( + image: MyAssets.globe, + ), + ), + ], ), ); } Positioned _bottomBtns(BuildContext context) { return Positioned( - bottom: MediaQuery.viewPaddingOf(context).bottom + MySpaces.s16, + bottom: MySpaces.s40, left: MySpaces.s16, right: MySpaces.s16, child: Row( @@ -81,17 +88,18 @@ class HomePage extends StatelessWidget { onTap: () => context.read().goToLanguagePage(context), child: MyImage( image: MyAssets.language, + size: setSize(context: context, tablet: 100), ), ), - MyButton( + MyYellowButton( onTap: () => context.read().goToLevelPage(context), - type: ButtonType.type2, title: context.translate.start, ), InkWell( onTap: () => context.read().showAboutUs(context), child: MyImage( image: MyAssets.theme, + size: setSize(context: context, tablet: 100), ), ), ],