diff --git a/assets/images/question.png b/assets/images/question.png deleted file mode 100644 index 5160d1e..0000000 Binary files a/assets/images/question.png and /dev/null differ diff --git a/assets/images/sample_avatar.png b/assets/images/sample_avatar.png new file mode 100644 index 0000000..098e964 Binary files /dev/null and b/assets/images/sample_avatar.png differ 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/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..f3092c6 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,7 +28,10 @@ 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'; + 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 175925c..1facbae 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), context.backgroundColor], + ), + ), 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), ], ); } 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'; }