Browse Source

fix: award page

pull/10/head
AmirrezaChegini 1 week ago
parent
commit
61abc08204
  1. 7
      lib/features/awards/presentation/ui/awards_page.dart
  2. 25
      lib/features/awards/presentation/ui/widgets/award_widget.dart

7
lib/features/awards/presentation/ui/awards_page.dart

@ -1,7 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.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/background/my_background.dart';
import 'package:shia_game_flutter/features/awards/presentation/controller/awards_controller.dart'; import 'package:shia_game_flutter/features/awards/presentation/controller/awards_controller.dart';
import 'package:shia_game_flutter/features/awards/presentation/ui/widgets/award_widget.dart'; import 'package:shia_game_flutter/features/awards/presentation/ui/widgets/award_widget.dart';
@ -13,20 +11,17 @@ class AwardsPage extends GetView<AwardsController> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MyBackground( return MyBackground(
child: Column( child: Column(
spacing: 28,
children: [ children: [
60.0.gapHeight,
AwardWidget( AwardWidget(
images: controller.leagueAwards, images: controller.leagueAwards,
), ),
MySpaces.s28.gapHeight,
AwardWidget( AwardWidget(
images: controller.customAwards, images: controller.customAwards,
), ),
MySpaces.s28.gapHeight,
AwardWidget( AwardWidget(
images: controller.castAwards, images: controller.castAwards,
), ),
MySpaces.s30.gapHeight,
], ],
), ),
); );

25
lib/features/awards/presentation/ui/widgets/award_widget.dart

@ -1,5 +1,4 @@
import 'package:flutter/material.dart'; 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/resources/my_text_style.dart';
import 'package:shia_game_flutter/core/utils/my_localization.dart'; import 'package:shia_game_flutter/core/utils/my_localization.dart';
import 'package:shia_game_flutter/core/utils/page_scalable.dart'; import 'package:shia_game_flutter/core/utils/page_scalable.dart';
@ -74,20 +73,20 @@ class _AwardWidgetState extends State<AwardWidget> {
), ),
color: const Color(0XFF2B105A), color: const Color(0XFF2B105A),
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
bottom: MySpaces.s10,
top: MySpaces.s40,
bottom: 10,
top: 40,
), ),
child: Column( child: Column(
spacing: MySpaces.s12,
spacing: 12,
children: [ children: [
SizedBox( SizedBox(
height: 100,
height: 100.h,
child: Stack( child: Stack(
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: MySpaces.s16,
horizontal: 16,
), ),
child: PageView.builder( child: PageView.builder(
controller: pageController, controller: pageController,
@ -126,16 +125,16 @@ class _AwardWidgetState extends State<AwardWidget> {
), ),
), ),
Column( Column(
spacing: MySpaces.s2,
spacing: 2,
children: [ children: [
Text( Text(
context.translate.first_place, context.translate.first_place,
style: Lexend.extraBold.copyWith(fontSize: 14),
style: Lexend.extraBold.copyWith(fontSize: 14.sp),
), ),
GradientText( GradientText(
text: '1ST Week (May 2024)', text: '1ST Week (May 2024)',
textStyle: Lexend.semiBold.copyWith( textStyle: Lexend.semiBold.copyWith(
fontSize: 10,
fontSize: 10.sp,
shadows: [ shadows: [
const BoxShadow( const BoxShadow(
color: Color(0XFF3E1381), color: Color(0XFF3E1381),
@ -152,11 +151,11 @@ class _AwardWidgetState extends State<AwardWidget> {
), ),
), ),
Positioned( Positioned(
top: -MySpaces.s14,
top: -14,
child: Container( child: Container(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: MySpaces.s10,
vertical: MySpaces.s6,
horizontal: 10,
vertical: 6,
), ),
decoration: const BoxDecoration( decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(12)), borderRadius: BorderRadius.all(Radius.circular(12)),
@ -168,7 +167,7 @@ class _AwardWidgetState extends State<AwardWidget> {
text: context.translate.battle_league_awards, text: context.translate.battle_league_awards,
color: const Color(0XFFCAA8FF), color: const Color(0XFFCAA8FF),
textStyle: Lexend.medium.copyWith( textStyle: Lexend.medium.copyWith(
fontSize: 14,
fontSize: 10.sp,
shadows: [ shadows: [
const BoxShadow( const BoxShadow(
color: Color(0XFF3E1381), color: Color(0XFF3E1381),

Loading…
Cancel
Save