From 8b438eaef98197d8c1a0c78870ddb61b7f009f10 Mon Sep 17 00:00:00 2001 From: AmirrezaChegini Date: Sat, 18 Oct 2025 12:30:10 +0330 Subject: [PATCH 1/2] fix: intro page --- assets/images/question.png | Bin 1097 -> 0 bytes assets/svg/intro_star.svg | 61 ++++++++++++++ assets/svg/question.svg | 7 ++ lib/common_ui/resources/my_assets.dart | 4 +- .../intro/presentation/ui/intro_page.dart | 78 +++++++++++------- 5 files changed, 121 insertions(+), 29 deletions(-) delete mode 100644 assets/images/question.png create mode 100644 assets/svg/intro_star.svg create mode 100644 assets/svg/question.svg diff --git a/assets/images/question.png b/assets/images/question.png deleted file mode 100644 index 5160d1ee177b5824ab483d98ef167cfaca532be8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1097 zcmV-P1h)H$P)P001Tk1^@s6F~u+&00009a7bBm000XU z000XU0RWnu7ytkO0drDELIAGL9O(c600d`2O+f$vv5yPipR6};HW~~!>nBh?0X2g0CVm3o6M#2kODsoDz|9-=VhB{JpMWJo zk#b*#350 zY3g)fTAAl|N&w~~B(e$oA}`yJM-b}#Slc_U)Gl6*Wb)4JHV~BHN`ek+Tp9%HflSOD z0Fd2VA_qY=5ur^)hlIY9K1iS}1myknj3>nbrHi|*>QWy_(Jotsj`=5gu{Az+qg;1Z z+K^MGZnLXZcaeuP7Xc}Gm|Zh{ljdarM0QR-I(w~Z**9o9en$*4b$7Oufb^TIv~0QVa@iop6pW?5nX#+F8~7WZA7-c@Y{Fp$dY|VI0dfhg?Y2H`j@rSNmgDlo*R0F0A&=ju`(Gw*K1Qxn79g&3Lai&n zhrE%4Qm&G#rq+S?2|-8ib&K_mT@ z9BX^6$}1U}gB#D?GbshdP(M1#GoDLr8l^nE*y(aQ7UN^rlk$Rt<}#BG5&&Nh5T5Zi zV#_Z&r_u*J*IS6k?4l(tfY9CT?vDZ(0^!XsO-M2BR7TCbh+`3M;NRKJ~96G`Wm8QNLA8mmsl%pI;$|1nv@+NDx!6Yld(1u}hkTuIiTg zK*T^MN2~H6H%Pi2lJdb_#$wii$%)w-L|uuY;Q3CDN}$pOO)MA%AVLai@z|q~@>&os ziZ9}cxJY*(%_K$Y7UU4c-C-#lVpEslBEjGFB}FBSLCV$8rT?xeXHTFaDhlUw-H<7r zw4zE~+!G9ga9bMP%htJK^6uO_ASwr7OyNAt3P6aGgt7{5VL5B#(>rfwI9XTXxm0P$ zDJZue>lF5>M`K66F$$4|E_fURHIx2!(dE(*h&(t~SP^aam5uBJmjVz88j05FkCXe? zpRRLMZJs{N&|c?6^& diff --git a/assets/svg/intro_star.svg b/assets/svg/intro_star.svg new file mode 100644 index 0000000..17a95dd --- /dev/null +++ b/assets/svg/intro_star.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/svg/question.svg b/assets/svg/question.svg new file mode 100644 index 0000000..3af955f --- /dev/null +++ b/assets/svg/question.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/lib/common_ui/resources/my_assets.dart b/lib/common_ui/resources/my_assets.dart index 6edec51..7ce0a6b 100644 --- a/lib/common_ui/resources/my_assets.dart +++ b/lib/common_ui/resources/my_assets.dart @@ -6,7 +6,6 @@ class MyAssets { /// ----- Images ----- static const String sample = 'assets/images/sample.png'; static const String shiaMind = 'assets/images/shia_mind.png'; - static const String question = 'assets/images/question.png'; static const String iconProfile = 'assets/images/icon_profile.png'; static const String iconDiamond = 'assets/images/icon_diamond.png'; static const String iconFlash = 'assets/images/icon_flash.png'; @@ -16,6 +15,7 @@ class MyAssets { static const String addBackground = 'assets/images/add_background.png'; static const String mic = 'assets/images/mic.png'; static const String micBLur = 'assets/images/mic_blur.png'; + static const String sampleAvatar = 'assets/images/sample_avatar.png'; /// ----- Svg ----- static const String sampleSvg = 'assets/svg/sample.svg'; @@ -28,6 +28,8 @@ class MyAssets { static const String iconClock = 'assets/svg/icon_clock.svg'; static const String medal = 'assets/svg/medal.svg'; static const String friendBattle = 'assets/svg/friend_battle.svg'; + static const String question = 'assets/svg/question.svg'; + static const String introStar = 'assets/svg/intro_star.svg'; /// ----- Audios ----- diff --git a/lib/features/intro/presentation/ui/intro_page.dart b/lib/features/intro/presentation/ui/intro_page.dart index 175925c..7593bb3 100644 --- a/lib/features/intro/presentation/ui/intro_page.dart +++ b/lib/features/intro/presentation/ui/intro_page.dart @@ -18,7 +18,15 @@ class IntroPage extends GetView { return Scaffold( backgroundColor: context.backgroundColor, body: SafeArea( - child: SizedBox.expand( + child: Container( + height: context.heightScreen, + width: context.widthScreen, + decoration: BoxDecoration( + gradient: RadialGradient( + radius: 0.7, + colors: [const Color(0xFF321A6D), const Color(0x00160C30)], + ), + ), child: Stack( alignment: Alignment.center, children: [ @@ -33,49 +41,63 @@ class IntroPage extends GetView { Stack _logo(BuildContext context) { return Stack( + clipBehavior: Clip.none, alignment: Alignment.center, children: [ + MyImage(asset: MyAssets.shiaMind), PositionedDirectional( - top: context.heightScreen / 3.2, - end: 50, - child: MyImage(asset: MyAssets.question), + top: -124, + end: -62, + child: MyImage( + asset: MyAssets.question, + ), ), PositionedDirectional( - top: context.heightScreen / 3.5, - end: context.widthScreen / 2.4, - child: MyImage(asset: MyAssets.question, size: 30), + top: -157, + end: 60, + child: MyImage( + asset: MyAssets.question, + size: 30, + ), ), PositionedDirectional( - top: context.heightScreen / 2.8, - start: 80, - child: MyImage(asset: MyAssets.question, size: 24), + top: -90, + start: -30, + child: MyImage( + asset: MyAssets.question, + size: 25, + ), ), PositionedDirectional( - bottom: context.heightScreen / 3.2, - start: 80, - child: MyImage(asset: MyAssets.question), + bottom: -90, + start: -30, + child: MyImage( + asset: MyAssets.question, + ), ), PositionedDirectional( - bottom: context.heightScreen / 3.2, - end: 50, - child: MyImage(asset: MyAssets.question, size: 20), + bottom: -90, + end: -62, + child: MyImage( + asset: MyAssets.question, + size: 15, + ), ), PositionedDirectional( - bottom: context.heightScreen / 2.6, - start: context.widthScreen / 2, - child: MyImage(asset: MyAssets.question, size: 20), + bottom: -10, + end: 70, + child: MyImage( + asset: MyAssets.question, + size: 15, + ), ), - Container( - width: context.widthScreen, - height: context.heightScreen, - decoration: ShapeDecoration( - gradient: RadialGradient( - colors: [const Color(0xFF321A6D), const Color(0x00160C30)], - ), - shape: OvalBorder(), + PositionedDirectional( + top: -15, + child: MyImage( + asset: MyAssets.introStar, + size: 75, ), ), - MyImage(asset: MyAssets.shiaMind), ], ); } -- 2.30.2 From 232a8ae027183906fbfd6f8e909b9121e634f164 Mon Sep 17 00:00:00 2001 From: AmirrezaChegini Date: Sat, 18 Oct 2025 16:22:56 +0330 Subject: [PATCH 2/2] add: profile photo --- assets/images/sample_avatar.png | Bin 0 -> 17358 bytes assets/svg/icon_location.svg | 3 + assets/svg/icon_logout.svg | 4 + lib/common_ui/resources/my_assets.dart | 3 +- lib/core/routers/my_routes.dart | 4 - .../widgets/background/my_background.dart | 25 +++++ .../widgets/button/my_gradient_button.dart | 45 +++++++++ .../widgets/container/gradient_container.dart | 87 +++++++++-------- lib/core/widgets/input/my_input.dart | 91 ++++++++++++++++++ .../home/presentation/pages/home_page.dart | 6 +- .../pages/widgets/home_battle_cast.dart | 2 +- .../pages/widgets/home_battle_league.dart | 2 + .../pages/widgets/home_membership.dart | 3 +- .../intro/presentation/ui/intro_page.dart | 2 +- .../master/presentation/ui/master_page.dart | 3 +- .../profile/presentation/ui/profile_page.dart | 56 ++++++++++- .../ui/widgets/profile_avatar.dart | 21 ++++ .../ui/widgets/profile_delete_account.dart | 39 ++++++++ .../ui/widgets/profile_location.dart | 20 ++++ .../ui/widgets/profile_logout.dart | 38 ++++++++ lib/l10n/app_en.arb | 4 +- lib/l10n/app_localizations.dart | 12 +++ lib/l10n/app_localizations_en.dart | 6 ++ 23 files changed, 421 insertions(+), 55 deletions(-) create mode 100644 assets/images/sample_avatar.png create mode 100644 assets/svg/icon_location.svg create mode 100644 assets/svg/icon_logout.svg create mode 100644 lib/core/widgets/background/my_background.dart create mode 100644 lib/core/widgets/button/my_gradient_button.dart create mode 100644 lib/core/widgets/input/my_input.dart create mode 100644 lib/features/profile/presentation/ui/widgets/profile_avatar.dart create mode 100644 lib/features/profile/presentation/ui/widgets/profile_delete_account.dart create mode 100644 lib/features/profile/presentation/ui/widgets/profile_location.dart create mode 100644 lib/features/profile/presentation/ui/widgets/profile_logout.dart diff --git a/assets/images/sample_avatar.png b/assets/images/sample_avatar.png new file mode 100644 index 0000000000000000000000000000000000000000..098e9641bee81c7bf21e9a723a5182da11a3e356 GIT binary patch literal 17358 zcmV(*K;FNJP)Fya#(2O(+qYOwO36RJjk(^0pv5f-;n|=Ow{cId@2CcozuEPTVdhNw) zV}ZR+`%JJG+hmN%V2}WVvPM~&9D1g6)%(u5RXwdiVI&Qhccq%H?yjzI&pqio=bmff z|Doo2UK?K)ag*1D-0J-Ox~i?Z^^MxvxozRLO7<x) ze47wYi1kNqkC1SW;7!`zRD|-0^I?n-XTOBWXMlk{+;*G&!Vr+l?0rlu2}Ejubc=c4 zGz*9(aj#!fIBUPB5~AHkg58C`a{H?h%IBU>a=Qkjh$BRJg!<(?oZ?QQryiysBelbNOLS+`{C=E@qx$qjlj32UfLqZY%It`(Ddg+9 z=g~?z^);fho!d$nE^Egd*xoQg?T605#qJGYf2)(X5q?F}K6uY-OJV@hii0zGs4-rTc~Un)?2!WObp9KWkxq9E?t8!zWAxb<-ZVH!>%?+b-cpJ9%K8U(>7aHrzC|SEm#7@-K zdg#mc;@MZ$Vb4Ggv3MQzkpr9ZOvIk&I()U2up;4H{wtIExoj4RXarN6CZZ`_3!5V# zpDmz34l9+)BrXZ-m6W(;x1^t)ckyNT&^4b#%aqpY+g%Amuy(vo?R6s*iF5^DZh|l7 zM65kc0y?eczzeCk^gPvaMUH^s;UT1B6l;?wV*&}3 z8_tn)gu8^}T%J3xiY*q2z@q#tl{{o}d2T}(rsy0l6!7+UUxbfe`$bHhK0SEkcD#<< zHSUD+b&;6b*94!fy2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n*~G( z@-S_g53Ex)&AdPtLFnFyLMLLDe2uqFM{@2ls5^cM9O}8M_J$Lv`Z511%{S$j!54|u z-|gDI9e*aV9=-Qoyztc17|0C1_C~$RdHlC~r!kwnOFt{tpDv zGZ55PH5}tskX3IlVg>6RdJ0i_NTrf!X`POv=Fi8x`A6f#(@w+D3l{9_vO*BCTvxmi zI_O~SO+l!jRdJa_k}o>Yv6+DZY#N$@{nyq0{;Jp0?-}p*e*uK(cMIIxe$)T}002ovPDHLk FV1n7I$j$%& literal 0 HcmV?d00001 diff --git a/assets/svg/icon_location.svg b/assets/svg/icon_location.svg new file mode 100644 index 0000000..9425b31 --- /dev/null +++ b/assets/svg/icon_location.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/svg/icon_logout.svg b/assets/svg/icon_logout.svg new file mode 100644 index 0000000..cdd0505 --- /dev/null +++ b/assets/svg/icon_logout.svg @@ -0,0 +1,4 @@ + + + + diff --git a/lib/common_ui/resources/my_assets.dart b/lib/common_ui/resources/my_assets.dart index 7ce0a6b..f3092c6 100644 --- a/lib/common_ui/resources/my_assets.dart +++ b/lib/common_ui/resources/my_assets.dart @@ -30,7 +30,8 @@ class MyAssets { static const String friendBattle = 'assets/svg/friend_battle.svg'; static const String question = 'assets/svg/question.svg'; static const String introStar = 'assets/svg/intro_star.svg'; - + static const String iconLocation = 'assets/svg/icon_location.svg'; + static const String iconLogout = 'assets/svg/icon_logout.svg'; /// ----- Audios ----- static const String sampleAudio = 'assets/audios/sample.mp3'; diff --git a/lib/core/routers/my_routes.dart b/lib/core/routers/my_routes.dart index 272cf33..dd600e2 100644 --- a/lib/core/routers/my_routes.dart +++ b/lib/core/routers/my_routes.dart @@ -48,25 +48,21 @@ List get appPages => [ name: Routes.homePage, page: () => const HomePage(), binding: HomeBinding(), - transition: Transition.fadeIn, ), GetPage( name: Routes.shopPage, page: () => const ShopPage(), binding: ShopBinding(), - transition: Transition.fadeIn, ), GetPage( name: Routes.awardsPage, page: () => const AwardsPage(), binding: AwardsBinding(), - transition: Transition.fadeIn, ), GetPage( name: Routes.profilePage, page: () => const ProfilePage(), binding: ProfileBinding(), - transition: Transition.fadeIn, ), ], ), diff --git a/lib/core/widgets/background/my_background.dart b/lib/core/widgets/background/my_background.dart new file mode 100644 index 0000000..7252a15 --- /dev/null +++ b/lib/core/widgets/background/my_background.dart @@ -0,0 +1,25 @@ +import 'package:flutter/material.dart'; +import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart'; +import 'package:shia_game_flutter/common_ui/theme/my_theme.dart'; + +class MyBackground extends StatelessWidget { + const MyBackground({super.key, required this.child}); + + final Widget child; + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + gradient: RadialGradient( + radius: 0.6, + colors: [const Color(0xFF321A6D), context.backgroundColor], + ), + ), + child: SingleChildScrollView( + padding: EdgeInsets.symmetric(horizontal: MySpaces.s30), + child: child, + ), + ); + } +} diff --git a/lib/core/widgets/button/my_gradient_button.dart b/lib/core/widgets/button/my_gradient_button.dart new file mode 100644 index 0000000..133fee4 --- /dev/null +++ b/lib/core/widgets/button/my_gradient_button.dart @@ -0,0 +1,45 @@ +import 'package:flutter/material.dart'; +import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; +import 'package:shia_game_flutter/core/widgets/container/gradient_container.dart'; + +class MyGradientButton extends StatelessWidget { + const MyGradientButton({super.key}); + + @override + Widget build(BuildContext context) { + return GradientContainer( + height: 32, + width: 116, + onTap: () {}, + borderColor: Color(0XFF6D2ADA), + borderRadius: BorderRadius.all(Radius.circular(5)), + gradient: LinearGradient( + begin: AlignmentDirectional.topStart, + end: AlignmentDirectional.bottomEnd, + colors: [Color(0XFF823FEB), Color(0XFF4F09BF)], + ), + child: ShaderMask( + blendMode: BlendMode.modulate, + shaderCallback: (bounds) => LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [Color(0XFFFFFFFF), Color(0XFFFFFFFF), Color(0XFF9C8CC2)], + ).createShader(bounds), + child: Text( + 'Change Profile', + style: Lexend.extraBold.copyWith( + fontSize: 12, + shadows: [ + BoxShadow( + color: Color(0xFF1B0D31), + blurRadius: 0, + offset: Offset(0, 1.69), + spreadRadius: 0, + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/core/widgets/container/gradient_container.dart b/lib/core/widgets/container/gradient_container.dart index f7a41d8..ab1cacf 100644 --- a/lib/core/widgets/container/gradient_container.dart +++ b/lib/core/widgets/container/gradient_container.dart @@ -1,11 +1,11 @@ import 'package:flutter/material.dart'; +import 'package:shia_game_flutter/common_ui/theme/my_theme.dart'; class GradientContainer extends StatelessWidget { const GradientContainer({ super.key, this.width, this.height, - this.margin, this.padding, this.shapeBorder, this.boxShape, @@ -17,11 +17,11 @@ class GradientContainer extends StatelessWidget { this.image, this.gradient, this.borderColor, + this.onTap, }); final double? width; final double? height; - final EdgeInsetsGeometry? margin; final EdgeInsetsGeometry? padding; final ShapeBorder? shapeBorder; final BoxShape? boxShape; @@ -33,45 +33,56 @@ class GradientContainer extends StatelessWidget { final Color? borderColor; final Widget? child; final DecorationImage? image; + final VoidCallback? onTap; @override Widget build(BuildContext context) { - return Container( - padding: EdgeInsets.all(1), - width: width, - height: height, - margin: margin, - decoration: shapeBorder == null - ? BoxDecoration( - shape: boxShape ?? BoxShape.rectangle, - gradient: borderGradient, - borderRadius: borderRadius, - boxShadow: boxShadow, - color: borderColor, - ) - : ShapeDecoration( - shape: shapeBorder!, - gradient: borderGradient, - shadows: boxShadow, - color: borderColor, - ), - child: Container( - padding: padding, - decoration: shapeBorder == null - ? BoxDecoration( - shape: boxShape ?? BoxShape.rectangle, - gradient: gradient, - borderRadius: borderRadius, - color: color, - image: image, - ) - : ShapeDecoration( - shape: shapeBorder!, - gradient: gradient, - color: color, - image: image, - ), - child: child, + return Material( + color: context.noColor, + borderRadius: borderRadius, + shadowColor: boxShadow?.first.color, + elevation: boxShadow?.first.blurRadius ?? 0, + shape: shapeBorder, + child: InkWell( + onTap: onTap, + customBorder: RoundedRectangleBorder( + borderRadius: borderRadius ?? BorderRadius.zero, + ), + child: Ink( + padding: EdgeInsets.all(1), + width: width, + height: height, + decoration: shapeBorder == null + ? BoxDecoration( + shape: boxShape ?? BoxShape.rectangle, + gradient: borderGradient, + borderRadius: borderRadius, + color: borderColor, + ) + : ShapeDecoration( + shape: shapeBorder!, + gradient: borderGradient, + color: borderColor, + ), + child: Ink( + padding: padding, + decoration: shapeBorder == null + ? BoxDecoration( + shape: boxShape ?? BoxShape.rectangle, + gradient: gradient, + borderRadius: borderRadius, + color: color, + image: image, + ) + : ShapeDecoration( + shape: shapeBorder!, + gradient: gradient, + color: color, + image: image, + ), + child: Center(child: child), + ), + ), ), ); } diff --git a/lib/core/widgets/input/my_input.dart b/lib/core/widgets/input/my_input.dart new file mode 100644 index 0000000..5e649f0 --- /dev/null +++ b/lib/core/widgets/input/my_input.dart @@ -0,0 +1,91 @@ +import 'package:flutter/material.dart'; +import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart'; +import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; +import 'package:shia_game_flutter/common_ui/theme/my_theme.dart'; + +class MyInput extends StatelessWidget { + const MyInput({ + super.key, + this.labelText, + this.hintText, + this.controller, + this.obscureText, + this.keyboardType, + this.action, + this.validator, + this.onChanged, + this.onTap, + this.onEditingComplete, + this.onTapOutside, + this.enabled, + this.readOnly, + this.maxLines, + this.minLines, + }); + + final String? labelText; + final String? hintText; + final TextEditingController? controller; + final bool? obscureText; + final TextInputType? keyboardType; + final TextInputAction? action; + final String? Function(String?)? validator; + final void Function(String)? onChanged; + final void Function()? onTap; + final void Function()? onEditingComplete; + final void Function(PointerDownEvent)? onTapOutside; + final bool? enabled; + final bool? readOnly; + final int? maxLines; + final int? minLines; + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + spacing: MySpaces.s8, + children: [ + if (labelText != null && labelText!.isNotEmpty) + Text( + labelText ?? '', + style: Lexend.bold.copyWith(fontSize: 12), + ), + TextFormField( + controller: controller, + obscureText: obscureText ?? false, + keyboardType: keyboardType, + textInputAction: action, + validator: validator, + onChanged: onChanged, + onTap: onTap, + onEditingComplete: onEditingComplete, + enabled: enabled, + readOnly: readOnly ?? false, + maxLines: maxLines, + minLines: minLines, + style: Lexend.extraBold.copyWith(fontSize: 12), + cursorColor: context.primaryColor, + decoration: InputDecoration( + contentPadding: EdgeInsets.all(MySpaces.s14), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(12)), + borderSide: BorderSide(color: Color(0XFF5715BF), width: 1), + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(12)), + borderSide: BorderSide(color: Color(0XFF5715BF), width: 1), + ), + fillColor: Color(0XFF000000).withValues(alpha: 0.2), + filled: true, + hintText: hintText, + hintStyle: Lexend.extraBold.copyWith(fontSize: 12), + ), + onTapOutside: (event) { + FocusManager.instance.primaryFocus?.unfocus(); + onTapOutside?.call(event); + }, + ), + ], + ); + } +} diff --git a/lib/features/home/presentation/pages/home_page.dart b/lib/features/home/presentation/pages/home_page.dart index fc404e1..878a860 100644 --- a/lib/features/home/presentation/pages/home_page.dart +++ b/lib/features/home/presentation/pages/home_page.dart @@ -1,8 +1,9 @@ -import 'package:flutter/material.dart' hide BoxShadow, BoxDecoration; +import 'package:flutter/material.dart' ; import 'package:get/get.dart'; import 'package:shia_game_flutter/common_ui/resources/my_assets.dart'; import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart'; import 'package:shia_game_flutter/core/utils/gap.dart'; +import 'package:shia_game_flutter/core/widgets/background/my_background.dart'; import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; import 'package:shia_game_flutter/features/home/presentation/controller/home_controller.dart'; import 'package:shia_game_flutter/features/home/presentation/pages/widgets/home_battle_cast.dart'; @@ -15,8 +16,7 @@ class HomePage extends GetView { @override Widget build(BuildContext context) { - return SingleChildScrollView( - padding: EdgeInsets.symmetric(horizontal: MySpaces.s32), + return MyBackground( child: Column( children: [ MySpaces.s28.gapHeight, diff --git a/lib/features/home/presentation/pages/widgets/home_battle_cast.dart b/lib/features/home/presentation/pages/widgets/home_battle_cast.dart index 2cd7d8f..e3ea720 100644 --- a/lib/features/home/presentation/pages/widgets/home_battle_cast.dart +++ b/lib/features/home/presentation/pages/widgets/home_battle_cast.dart @@ -20,7 +20,7 @@ class HomeBattleCast extends StatelessWidget { children: [ GradientContainer( height: 120, - borderRadius: BorderRadiusDirectional.all(Radius.circular(MySpaces.s20)), + borderRadius: BorderRadius.all(Radius.circular(MySpaces.s20)), borderGradient: LinearGradient( begin: AlignmentDirectional.topCenter, end: AlignmentDirectional.bottomCenter, diff --git a/lib/features/home/presentation/pages/widgets/home_battle_league.dart b/lib/features/home/presentation/pages/widgets/home_battle_league.dart index aac63c7..54eeaea 100644 --- a/lib/features/home/presentation/pages/widgets/home_battle_league.dart +++ b/lib/features/home/presentation/pages/widgets/home_battle_league.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:shia_game_flutter/common_ui/resources/my_assets.dart'; import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; +import 'package:shia_game_flutter/core/utils/gap.dart'; import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/container/gradient_container.dart'; import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; @@ -36,6 +37,7 @@ class HomeBattleLeague extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.start, children: [ + context.widthScreen.gapWidth, ShaderMask( blendMode: BlendMode.modulate, shaderCallback: (bounds) => LinearGradient( diff --git a/lib/features/home/presentation/pages/widgets/home_membership.dart b/lib/features/home/presentation/pages/widgets/home_membership.dart index a575d0a..a505bbd 100644 --- a/lib/features/home/presentation/pages/widgets/home_membership.dart +++ b/lib/features/home/presentation/pages/widgets/home_membership.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:shia_game_flutter/common_ui/resources/my_assets.dart'; +import 'package:shia_game_flutter/common_ui/resources/my_colors.dart'; import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/common_ui/theme/my_theme.dart'; @@ -28,7 +29,7 @@ class HomeMembership extends StatelessWidget { borderRadius: BorderRadius.all(Radius.circular(MySpaces.s20)), boxShadow: [ BoxShadow( - color: Color(0x3F000000), + color: MyColors.black, blurRadius: 17, offset: Offset(0, 4), spreadRadius: 20, diff --git a/lib/features/intro/presentation/ui/intro_page.dart b/lib/features/intro/presentation/ui/intro_page.dart index 7593bb3..1facbae 100644 --- a/lib/features/intro/presentation/ui/intro_page.dart +++ b/lib/features/intro/presentation/ui/intro_page.dart @@ -24,7 +24,7 @@ class IntroPage extends GetView { decoration: BoxDecoration( gradient: RadialGradient( radius: 0.7, - colors: [const Color(0xFF321A6D), const Color(0x00160C30)], + colors: [const Color(0xFF321A6D), context.backgroundColor], ), ), child: Stack( diff --git a/lib/features/master/presentation/ui/master_page.dart b/lib/features/master/presentation/ui/master_page.dart index 4866d68..064d78f 100644 --- a/lib/features/master/presentation/ui/master_page.dart +++ b/lib/features/master/presentation/ui/master_page.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:shia_game_flutter/common_ui/theme/my_theme.dart'; import 'package:shia_game_flutter/core/routers/my_routes.dart'; import 'package:shia_game_flutter/core/widgets/app_bar/master_app_bar.dart'; import 'package:shia_game_flutter/core/widgets/bottom_nav_bar/bottom_nav_bar.dart'; @@ -12,7 +11,7 @@ class MasterPage extends GetView { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: context.backgroundColor, + resizeToAvoidBottomInset: false, appBar: MasterAppBar(), bottomNavigationBar: BottomNavBar(), body: GetRouterOutlet( diff --git a/lib/features/profile/presentation/ui/profile_page.dart b/lib/features/profile/presentation/ui/profile_page.dart index 8a4a3a3..210589e 100644 --- a/lib/features/profile/presentation/ui/profile_page.dart +++ b/lib/features/profile/presentation/ui/profile_page.dart @@ -1,14 +1,64 @@ import 'package:flutter/material.dart'; -import 'package:shia_game_flutter/features/profile/presentation/controller/profile_controller.dart'; import 'package:get/get.dart'; +import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart'; +import 'package:shia_game_flutter/core/utils/gap.dart'; +import 'package:shia_game_flutter/core/widgets/background/my_background.dart'; +import 'package:shia_game_flutter/core/widgets/button/my_gradient_button.dart'; +import 'package:shia_game_flutter/core/widgets/input/my_input.dart'; +import 'package:shia_game_flutter/features/profile/presentation/controller/profile_controller.dart'; +import 'package:shia_game_flutter/features/profile/presentation/ui/widgets/profile_avatar.dart'; +import 'package:shia_game_flutter/features/profile/presentation/ui/widgets/profile_delete_account.dart'; +import 'package:shia_game_flutter/features/profile/presentation/ui/widgets/profile_location.dart'; +import 'package:shia_game_flutter/features/profile/presentation/ui/widgets/profile_logout.dart'; class ProfilePage extends GetView { const ProfilePage({super.key}); @override Widget build(BuildContext context) { - return const Center( - child: Text('Profile Page'), + return MyBackground( + child: Column( + children: [ + 60.0.gapHeight, + ProfileAvatar(), + MyGradientButton(), + MySpaces.s40.gapHeight, + MyInput( + labelText: 'User Name', + hintText: 'Unknown123456', + ), + MySpaces.s28.gapHeight, + _locationInput(), + 200.0.gapHeight, + _bottomButtons(), + ], + ), + ); + } + + Row _locationInput() { + return Row( + crossAxisAlignment: CrossAxisAlignment.end, + spacing: MySpaces.s10, + children: [ + Expanded( + child: MyInput( + labelText: 'Your Region', + hintText: 'Iran - Tehran', + ), + ), + ProfileLocation(), + ], + ); + } + + Row _bottomButtons() { + return Row( + spacing: MySpaces.s20, + children: [ + Expanded(child: ProfileDeleteAccount()), + Expanded(child: ProfileLogout()), + ], ); } } diff --git a/lib/features/profile/presentation/ui/widgets/profile_avatar.dart b/lib/features/profile/presentation/ui/widgets/profile_avatar.dart new file mode 100644 index 0000000..9b3c167 --- /dev/null +++ b/lib/features/profile/presentation/ui/widgets/profile_avatar.dart @@ -0,0 +1,21 @@ +import 'package:flutter/material.dart'; +import 'package:shia_game_flutter/common_ui/resources/my_assets.dart'; +import 'package:shia_game_flutter/common_ui/theme/my_theme.dart'; +import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; + +class ProfileAvatar extends StatelessWidget { + const ProfileAvatar({super.key}); + + @override + Widget build(BuildContext context) { + return Container( + height: 106, + width: 106, + decoration: BoxDecoration( + shape: BoxShape.circle, + border: Border.all(width: 2.5, color: context.primaryColor), + ), + child: MyImage(asset: MyAssets.sampleAvatar), + ); + } +} diff --git a/lib/features/profile/presentation/ui/widgets/profile_delete_account.dart b/lib/features/profile/presentation/ui/widgets/profile_delete_account.dart new file mode 100644 index 0000000..f44437e --- /dev/null +++ b/lib/features/profile/presentation/ui/widgets/profile_delete_account.dart @@ -0,0 +1,39 @@ +import 'package:flutter/material.dart'; +import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart'; +import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; +import 'package:shia_game_flutter/common_ui/theme/my_theme.dart'; +import 'package:shia_game_flutter/core/utils/my_localization.dart'; +import 'package:shia_game_flutter/core/widgets/container/gradient_container.dart'; + +class ProfileDeleteAccount extends StatelessWidget { + const ProfileDeleteAccount({super.key}); + + @override + Widget build(BuildContext context) { + return GradientContainer( + height: 58, + onTap: () {}, + borderRadius: BorderRadius.all(Radius.circular(MySpaces.s12)), + color: context.backgroundColor, + borderGradient: LinearGradient( + begin: AlignmentDirectional.centerStart, + end: AlignmentDirectional.centerEnd, + colors: [ + Color(0XFF7E94B4).withValues(alpha: 0.3), + Color(0XFF304053).withValues(alpha: 0), + ], + ), + padding: EdgeInsets.symmetric( + vertical: MySpaces.s16, + horizontal: MySpaces.s28, + ), + child: FittedBox( + child: Text( + context.translate.delete_account, + maxLines: 1, + style: Lexend.semiBold.copyWith(fontSize: 14, color: Color(0XFF5F5F88)), + ), + ), + ); + } +} diff --git a/lib/features/profile/presentation/ui/widgets/profile_location.dart b/lib/features/profile/presentation/ui/widgets/profile_location.dart new file mode 100644 index 0000000..233eb43 --- /dev/null +++ b/lib/features/profile/presentation/ui/widgets/profile_location.dart @@ -0,0 +1,20 @@ +import 'package:flutter/material.dart'; +import 'package:shia_game_flutter/common_ui/resources/my_assets.dart'; +import 'package:shia_game_flutter/core/widgets/container/gradient_container.dart'; +import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; + +class ProfileLocation extends StatelessWidget { + const ProfileLocation({super.key}); + + @override + Widget build(BuildContext context) { + return GradientContainer( + onTap: () {}, + width: 48, + height: 48, + color: Color(0XFF5715BF), + borderRadius: BorderRadius.all(Radius.circular(12)), + child: MyImage(asset: MyAssets.iconLocation), + ); + } +} diff --git a/lib/features/profile/presentation/ui/widgets/profile_logout.dart b/lib/features/profile/presentation/ui/widgets/profile_logout.dart new file mode 100644 index 0000000..d1999cf --- /dev/null +++ b/lib/features/profile/presentation/ui/widgets/profile_logout.dart @@ -0,0 +1,38 @@ +import 'package:flutter/material.dart'; +import 'package:shia_game_flutter/common_ui/resources/my_assets.dart'; +import 'package:shia_game_flutter/common_ui/resources/my_spaces.dart'; +import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; +import 'package:shia_game_flutter/core/utils/my_localization.dart'; +import 'package:shia_game_flutter/core/widgets/container/gradient_container.dart'; +import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; + +class ProfileLogout extends StatelessWidget { + const ProfileLogout({super.key}); + + @override + Widget build(BuildContext context) { + return GradientContainer( + height: 58, + onTap: () {}, + borderRadius: BorderRadius.all(Radius.circular(MySpaces.s12)), + color: Color(0XFF270A59), + padding: EdgeInsets.symmetric( + vertical: MySpaces.s16, + horizontal: MySpaces.s28, + ), + child: Row( + spacing: MySpaces.s10, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + MyImage(asset: MyAssets.iconLogout), + FittedBox( + child: Text( + context.translate.logout, + style: Lexend.semiBold.copyWith(fontSize: 14), + ), + ), + ], + ), + ); + } +} diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 886f871..ec1386d 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -7,5 +7,7 @@ "profile": "Profile", "pro_membership": "Pro Membership", "custom_league": "Custom League", - "friends_battle": "Friends Battle" + "friends_battle": "Friends Battle", + "logout": "Log out", + "delete_account": "Delete Account" } \ No newline at end of file diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index c19bb98..3297b55 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -141,6 +141,18 @@ abstract class AppLocalizations { /// In en, this message translates to: /// **'Friends Battle'** String get friends_battle; + + /// No description provided for @logout. + /// + /// In en, this message translates to: + /// **'Log out'** + String get logout; + + /// No description provided for @delete_account. + /// + /// In en, this message translates to: + /// **'Delete Account'** + String get delete_account; } class _AppLocalizationsDelegate diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index ba4430c..0436ab4 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -31,4 +31,10 @@ class AppLocalizationsEn extends AppLocalizations { @override String get friends_battle => 'Friends Battle'; + + @override + String get logout => 'Log out'; + + @override + String get delete_account => 'Delete Account'; } -- 2.30.2