diff --git a/analysis_options.yaml b/analysis_options.yaml
index f9b3034..31e4275 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -1 +1,14 @@
include: package:flutter_lints/flutter.yaml
+
+linter:
+ rules:
+ prefer_const_constructors: true
+ prefer_const_declarations: true
+ prefer_const_constructors_in_immutables: true
+ prefer_final_fields: true
+ prefer_final_locals: true
+ avoid_classes_with_only_static_members: true
+ avoid_print: true
+ always_declare_return_types: true
+ use_key_in_widget_constructors: true
+ require_trailing_commas: true
\ No newline at end of file
diff --git a/assets/svg/cast_award_bronze.svg b/assets/svg/cast_award_bronze.svg
new file mode 100644
index 0000000..65fcbec
--- /dev/null
+++ b/assets/svg/cast_award_bronze.svg
@@ -0,0 +1,9 @@
+
diff --git a/assets/svg/cast_award_gold.svg b/assets/svg/cast_award_gold.svg
new file mode 100644
index 0000000..6e58ad5
--- /dev/null
+++ b/assets/svg/cast_award_gold.svg
@@ -0,0 +1,9 @@
+
diff --git a/assets/svg/cast_award_silver.svg b/assets/svg/cast_award_silver.svg
new file mode 100644
index 0000000..f95b5e4
--- /dev/null
+++ b/assets/svg/cast_award_silver.svg
@@ -0,0 +1,9 @@
+
diff --git a/assets/svg/custom_award_bronze.svg b/assets/svg/custom_award_bronze.svg
new file mode 100644
index 0000000..c41ec8f
--- /dev/null
+++ b/assets/svg/custom_award_bronze.svg
@@ -0,0 +1,9 @@
+
diff --git a/assets/svg/custom_award_gold.svg b/assets/svg/custom_award_gold.svg
new file mode 100644
index 0000000..2bf43bf
--- /dev/null
+++ b/assets/svg/custom_award_gold.svg
@@ -0,0 +1,9 @@
+
diff --git a/assets/svg/custom_award_silver.svg b/assets/svg/custom_award_silver.svg
new file mode 100644
index 0000000..732f668
--- /dev/null
+++ b/assets/svg/custom_award_silver.svg
@@ -0,0 +1,9 @@
+
diff --git a/assets/svg/league_award_bronze.svg b/assets/svg/league_award_bronze.svg
new file mode 100644
index 0000000..5392a27
--- /dev/null
+++ b/assets/svg/league_award_bronze.svg
@@ -0,0 +1,9 @@
+
diff --git a/assets/svg/league_award_gold.svg b/assets/svg/league_award_gold.svg
new file mode 100644
index 0000000..ae95d08
--- /dev/null
+++ b/assets/svg/league_award_gold.svg
@@ -0,0 +1,9 @@
+
diff --git a/assets/svg/league_award_silver.svg b/assets/svg/league_award_silver.svg
new file mode 100644
index 0000000..2af9688
--- /dev/null
+++ b/assets/svg/league_award_silver.svg
@@ -0,0 +1,9 @@
+
diff --git a/lib/common_ui/resources/my_assets.dart b/lib/common_ui/resources/my_assets.dart
index d6a78dc..98c589f 100644
--- a/lib/common_ui/resources/my_assets.dart
+++ b/lib/common_ui/resources/my_assets.dart
@@ -54,6 +54,15 @@ class MyAssets {
static const String iconInfo = 'assets/svg/icon_info.svg';
static const String gem = 'assets/svg/gem.svg';
static const String lock = 'assets/svg/lock.svg';
+ static const String leagueAwardGold = 'assets/svg/league_award_gold.svg';
+ static const String leagueAwardSilver = 'assets/svg/league_award_silver.svg';
+ static const String leagueAwardBronze = 'assets/svg/league_award_bronze.svg';
+ static const String customAwardGold = 'assets/svg/custom_award_gold.svg';
+ static const String customAwardSilver = 'assets/svg/custom_award_silver.svg';
+ static const String customAwardBronze = 'assets/svg/custom_award_bronze.svg';
+ static const String castAwardGold = 'assets/svg/cast_award_gold.svg';
+ static const String castAwardSilver = 'assets/svg/cast_award_silver.svg';
+ static const String castAwardBronze = 'assets/svg/cast_award_bronze.svg';
/// ----- Audios -----
diff --git a/lib/common_ui/resources/my_text_style.dart b/lib/common_ui/resources/my_text_style.dart
index 0f11748..d779438 100644
--- a/lib/common_ui/resources/my_text_style.dart
+++ b/lib/common_ui/resources/my_text_style.dart
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
+import 'package:shia_game_flutter/common_ui/resources/my_colors.dart';
class Lexend {
static const Lexend _i = Lexend._internal();
@@ -6,49 +7,59 @@ class Lexend {
factory Lexend() => _i;
static const String fontFamily = 'Lexend';
+ static const Color textColor = MyColors.white;
static const TextStyle thin = TextStyle(
fontFamily: fontFamily,
fontWeight: FontWeight.w100,
+ color: textColor,
);
static const TextStyle extraLight = TextStyle(
fontFamily: fontFamily,
fontWeight: FontWeight.w200,
+ color: textColor,
);
static const TextStyle light = TextStyle(
fontFamily: fontFamily,
fontWeight: FontWeight.w300,
+ color: textColor,
);
static const TextStyle regular = TextStyle(
fontFamily: fontFamily,
fontWeight: FontWeight.w400,
+ color: textColor,
);
static const TextStyle medium = TextStyle(
fontFamily: fontFamily,
fontWeight: FontWeight.w500,
+ color: textColor,
);
static const TextStyle semiBold = TextStyle(
fontFamily: fontFamily,
fontWeight: FontWeight.w600,
+ color: textColor,
);
static const TextStyle bold = TextStyle(
fontFamily: fontFamily,
fontWeight: FontWeight.w700,
+ color: textColor,
);
static const TextStyle extraBold = TextStyle(
fontFamily: fontFamily,
fontWeight: FontWeight.w800,
+ color: textColor,
);
static const TextStyle black = TextStyle(
fontFamily: fontFamily,
fontWeight: FontWeight.w900,
+ color: textColor,
);
}
diff --git a/lib/core/utils/page_scalable.dart b/lib/core/utils/page_scalable.dart
new file mode 100644
index 0000000..c729e6b
--- /dev/null
+++ b/lib/core/utils/page_scalable.dart
@@ -0,0 +1,15 @@
+class PageScalable {
+ static const PageScalable _i = PageScalable._internal();
+ const PageScalable._internal();
+ factory PageScalable() => _i;
+
+ static double scale({
+ required double currentPage,
+ required int index,
+ required double scaleFactor,
+ }) {
+ final double difference = (currentPage - index).abs();
+ final double scale = 1 - (difference * scaleFactor).clamp(0.0, scaleFactor);
+ return scale;
+ }
+}
diff --git a/lib/core/widgets/app_bar/master_app_bar.dart b/lib/core/widgets/app_bar/master_app_bar.dart
index 483fdcb..5e4ba7f 100644
--- a/lib/core/widgets/app_bar/master_app_bar.dart
+++ b/lib/core/widgets/app_bar/master_app_bar.dart
@@ -23,8 +23,8 @@ class MasterAppBar extends StatelessWidget implements PreferredSizeWidget {
icon: MyAssets.iconDiamond,
number: 999,
gradientColors: [
- Color(0XFF52C3ED),
- Color(0XFF4F16A0),
+ const Color(0XFF52C3ED),
+ const Color(0XFF4F16A0),
],
),
MySpaces.s6.gapWidth,
@@ -33,11 +33,11 @@ class MasterAppBar extends StatelessWidget implements PreferredSizeWidget {
icon: MyAssets.iconFlash,
number: 54,
gradientColors: [
- Color(0XFFEFB345),
- Color(0XFF4F16A0),
+ const Color(0XFFEFB345),
+ const Color(0XFF4F16A0),
],
),
- Spacer(),
+ const Spacer(),
AppBarAction(
icon: MyAssets.iconShare,
onTap: () {},
@@ -53,5 +53,5 @@ class MasterAppBar extends StatelessWidget implements PreferredSizeWidget {
}
@override
- Size get preferredSize => Size.fromHeight(kToolbarHeight);
+ Size get preferredSize => const Size.fromHeight(kToolbarHeight);
}
diff --git a/lib/core/widgets/app_bar/styles/app_bar_action.dart b/lib/core/widgets/app_bar/styles/app_bar_action.dart
index d1142ab..a8af150 100644
--- a/lib/core/widgets/app_bar/styles/app_bar_action.dart
+++ b/lib/core/widgets/app_bar/styles/app_bar_action.dart
@@ -15,10 +15,10 @@ class AppBarAction extends StatelessWidget {
onTap: onTap,
width: MySpaces.s32,
height: MySpaces.s32,
- padding: EdgeInsets.all(MySpaces.s6),
+ padding: const EdgeInsets.all(MySpaces.s6),
boxShape: BoxShape.circle,
- borderColor: Color(0XFF6D2ADA),
- gradient: LinearGradient(
+ borderColor: const Color(0XFF6D2ADA),
+ gradient: const LinearGradient(
begin: AlignmentDirectional.topStart,
end: AlignmentDirectional.bottomEnd,
colors: [Color(0XFF823FEB), Color(0XFF4F09BF)],
diff --git a/lib/core/widgets/app_bar/styles/app_bar_add_widget.dart b/lib/core/widgets/app_bar/styles/app_bar_add_widget.dart
index 7e9ef77..584b98e 100644
--- a/lib/core/widgets/app_bar/styles/app_bar_add_widget.dart
+++ b/lib/core/widgets/app_bar/styles/app_bar_add_widget.dart
@@ -27,13 +27,13 @@ class AppBarAddWidget extends StatelessWidget {
onTap: onTap,
width: 96,
height: 32,
- borderRadius: BorderRadius.all(Radius.circular(50)),
+ borderRadius: const BorderRadius.all(Radius.circular(50)),
borderGradient: LinearGradient(
begin: AlignmentDirectional.topStart,
end: AlignmentDirectional.bottomEnd,
colors: gradientColors ?? [],
),
- padding: EdgeInsetsDirectional.only(
+ padding: const EdgeInsetsDirectional.only(
start: MySpaces.s8,
end: MySpaces.s4,
),
@@ -54,10 +54,10 @@ class AppBarAddWidget extends StatelessWidget {
onTap: onTap,
width: 23,
height: 23,
- padding: EdgeInsets.all(5),
- color: Color(0XFF4F09BF),
+ padding: const EdgeInsets.all(5),
+ color: const Color(0XFF4F09BF),
boxShape: BoxShape.circle,
- child: MyImage(asset: MyAssets.iconPlus),
+ child: const MyImage(asset: MyAssets.iconPlus),
),
],
),
diff --git a/lib/core/widgets/background/my_background.dart b/lib/core/widgets/background/my_background.dart
index 54c5604..aaa6ab8 100644
--- a/lib/core/widgets/background/my_background.dart
+++ b/lib/core/widgets/background/my_background.dart
@@ -18,7 +18,7 @@ class MyBackground extends StatelessWidget {
),
),
child: listChild ?? SingleChildScrollView(
- padding: EdgeInsets.symmetric(horizontal: MySpaces.s30),
+ padding: const EdgeInsets.symmetric(horizontal: MySpaces.s30),
child: child,
),
);
diff --git a/lib/core/widgets/bottom_nav_bar/bottom_nav_bar.dart b/lib/core/widgets/bottom_nav_bar/bottom_nav_bar.dart
index 307782f..cde6a64 100644
--- a/lib/core/widgets/bottom_nav_bar/bottom_nav_bar.dart
+++ b/lib/core/widgets/bottom_nav_bar/bottom_nav_bar.dart
@@ -14,10 +14,10 @@ class BottomNavBar extends GetView {
Widget build(BuildContext context) {
return Container(
clipBehavior: Clip.none,
- padding: EdgeInsets.symmetric(
+ padding: const EdgeInsets.symmetric(
horizontal: MySpaces.s30
),
- decoration: BoxDecoration(
+ decoration: const BoxDecoration(
gradient: RadialGradient(
radius: 2.5,
colors: [Color(0XFF4F09BF), Color(0XFF250459)],
diff --git a/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_profile_item.dart b/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_profile_item.dart
index fe3f58f..93545b3 100644
--- a/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_profile_item.dart
+++ b/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_profile_item.dart
@@ -17,12 +17,12 @@ class BottomNavBarProfileItem extends StatelessWidget {
Container(
height: 26,
width: 26,
- padding: EdgeInsets.all(3),
+ padding: const EdgeInsets.all(3),
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(
width: 1,
- color: Color(0XFFF4EEFF),
+ color: const Color(0XFFF4EEFF),
)
),
child: MyImage(asset: bottomNavEntity.icon ?? ''),
diff --git a/lib/core/widgets/button/styles/active_style.dart b/lib/core/widgets/button/styles/active_style.dart
index 1ad6b75..0c75454 100644
--- a/lib/core/widgets/button/styles/active_style.dart
+++ b/lib/core/widgets/button/styles/active_style.dart
@@ -24,32 +24,32 @@ class ActiveStyle extends StatelessWidget {
height: 32,
width: 116,
onTap: onTap,
- borderRadius: BorderRadius.all(Radius.circular(5)),
+ borderRadius: const BorderRadius.all(Radius.circular(5)),
borderGradient: LinearGradient(
begin: AlignmentDirectional.centerStart,
end: AlignmentDirectional.centerEnd,
colors: [
- Color(0xFF2E7630),
- Color(0xFF2E7630).withValues(alpha: 0),
+ const Color(0xFF2E7630),
+ const Color(0xFF2E7630).withValues(alpha: 0),
]
),
- color: Color(0XFF172A19),
+ color: const Color(0XFF172A19),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
GradientText(
text: title,
gradientColor: [
- Color(0XFF54C221),
- Color(0XFF358111),
+ const Color(0XFF54C221),
+ const Color(0XFF358111),
],
- shadowColor: Color(0xFF0A1F0F),
- offset: Offset(0, 1.69),
+ shadowColor: const Color(0xFF0A1F0F),
+ offset: const Offset(0, 1.69),
fontSize: fontSize ?? 12,
),
if (icon != null) ...{
MySpaces.s6.gapWidth,
- icon ?? SizedBox.shrink(),
+ icon ?? const SizedBox.shrink(),
},
],
),
diff --git a/lib/core/widgets/button/styles/default_style.dart b/lib/core/widgets/button/styles/default_style.dart
index c2fd407..141098d 100644
--- a/lib/core/widgets/button/styles/default_style.dart
+++ b/lib/core/widgets/button/styles/default_style.dart
@@ -24,9 +24,9 @@ class DefaultStyle extends StatelessWidget {
height: 32,
width: 116,
onTap: onTap,
- borderColor: Color(0XFF6D2ADA),
- borderRadius: BorderRadius.all(Radius.circular(5)),
- gradient: LinearGradient(
+ borderColor: const Color(0XFF6D2ADA),
+ borderRadius: const BorderRadius.all(Radius.circular(5)),
+ gradient: const LinearGradient(
begin: AlignmentDirectional.topStart,
end: AlignmentDirectional.bottomEnd,
colors: [Color(0XFF823FEB), Color(0XFF4F09BF)],
@@ -36,14 +36,14 @@ class DefaultStyle extends StatelessWidget {
children: [
GradientText(
text: title,
- color: Color(0XFF9C8CC2),
- shadowColor: Color(0xFF1B0D31),
- offset: Offset(0, 1.69),
+ color: const Color(0XFF9C8CC2),
+ shadowColor: const Color(0xFF1B0D31),
+ offset: const Offset(0, 1.69),
fontSize: fontSize ?? 12,
),
if (icon != null) ...{
MySpaces.s6.gapWidth,
- icon ?? SizedBox.shrink(),
+ icon ?? const SizedBox.shrink(),
},
],
),
diff --git a/lib/core/widgets/container/my_container.dart b/lib/core/widgets/container/my_container.dart
index 76e9f22..b40dba0 100644
--- a/lib/core/widgets/container/my_container.dart
+++ b/lib/core/widgets/container/my_container.dart
@@ -40,7 +40,7 @@ class MyContainer extends StatelessWidget {
return Material(
color: context.noColor,
borderRadius: boxShape == BoxShape.circle
- ? BorderRadius.all(Radius.circular(100))
+ ? const BorderRadius.all(Radius.circular(100))
: borderRadius,
shadowColor: boxShadow?.first.color,
elevation: boxShadow?.first.blurRadius ?? 0,
@@ -48,11 +48,11 @@ class MyContainer extends StatelessWidget {
onTap: onTap,
customBorder: RoundedRectangleBorder(
borderRadius: boxShape == BoxShape.circle
- ? BorderRadius.all(Radius.circular(100))
+ ? const BorderRadius.all(Radius.circular(100))
: borderRadius ?? BorderRadius.zero,
),
child: Ink(
- padding: EdgeInsets.all(1),
+ padding: const EdgeInsets.all(1),
width: width,
height: height,
decoration: BoxDecoration(
diff --git a/lib/core/widgets/input/my_input.dart b/lib/core/widgets/input/my_input.dart
index 5e649f0..fb161dd 100644
--- a/lib/core/widgets/input/my_input.dart
+++ b/lib/core/widgets/input/my_input.dart
@@ -66,16 +66,16 @@ class MyInput extends StatelessWidget {
style: Lexend.extraBold.copyWith(fontSize: 12),
cursorColor: context.primaryColor,
decoration: InputDecoration(
- contentPadding: EdgeInsets.all(MySpaces.s14),
- enabledBorder: OutlineInputBorder(
+ contentPadding: const EdgeInsets.all(MySpaces.s14),
+ enabledBorder: const OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(12)),
borderSide: BorderSide(color: Color(0XFF5715BF), width: 1),
),
- focusedBorder: OutlineInputBorder(
+ focusedBorder: const OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(12)),
borderSide: BorderSide(color: Color(0XFF5715BF), width: 1),
),
- fillColor: Color(0XFF000000).withValues(alpha: 0.2),
+ fillColor: const Color(0XFF000000).withValues(alpha: 0.2),
filled: true,
hintText: hintText,
hintStyle: Lexend.extraBold.copyWith(fontSize: 12),
diff --git a/lib/core/widgets/text/gradient_text.dart b/lib/core/widgets/text/gradient_text.dart
index ed0ec13..c5be681 100644
--- a/lib/core/widgets/text/gradient_text.dart
+++ b/lib/core/widgets/text/gradient_text.dart
@@ -14,6 +14,7 @@ class GradientText extends StatelessWidget {
this.spreadRadius = 0,
this.offset = Offset.zero,
this.textAlign,
+ this.textStyle,
});
final String? text;
@@ -25,6 +26,7 @@ class GradientText extends StatelessWidget {
final double spreadRadius;
final Offset offset;
final TextAlign? textAlign;
+ final TextStyle? textStyle;
@override
Widget build(BuildContext context) {
@@ -43,7 +45,7 @@ class GradientText extends StatelessWidget {
text ?? '',
textAlign: textAlign,
maxLines: 1,
- style: Lexend.extraBold.copyWith(
+ style: textStyle ?? Lexend.extraBold.copyWith(
fontSize: fontSize,
shadows: [
BoxShadow(
diff --git a/lib/features/awards/presentation/controller/awards_controller.dart b/lib/features/awards/presentation/controller/awards_controller.dart
index e1b0bb4..d8ef81f 100644
--- a/lib/features/awards/presentation/controller/awards_controller.dart
+++ b/lib/features/awards/presentation/controller/awards_controller.dart
@@ -1,4 +1,5 @@
import 'package:flutter/cupertino.dart';
+import 'package:shia_game_flutter/common_ui/resources/my_assets.dart';
import 'package:shia_game_flutter/core/params/awards_params.dart';
import 'package:shia_game_flutter/core/status/base_status.dart';
import 'package:shia_game_flutter/features/awards/domain/entity/awards_entity.dart';
@@ -27,6 +28,22 @@ class AwardsController extends GetxController with StateMixin {
/// ----- Variables -----
final Rx awardsParams = Rx(AwardsParams());
final Rx awardsEntity = Rx(const AwardsEntity());
+ final RxDouble currentPage = RxDouble(0);
+ final List leagueAwards = [
+ MyAssets.leagueAwardGold,
+ MyAssets.leagueAwardSilver,
+ MyAssets.leagueAwardBronze,
+ ];
+ final List customAwards = [
+ MyAssets.customAwardGold,
+ MyAssets.customAwardSilver,
+ MyAssets.customAwardBronze,
+ ];
+ final List castAwards = [
+ MyAssets.castAwardGold,
+ MyAssets.castAwardSilver,
+ MyAssets.castAwardBronze,
+ ];
/// ------ Controllers ------
final TextEditingController textEditingController = TextEditingController();
diff --git a/lib/features/awards/presentation/ui/awards_page.dart b/lib/features/awards/presentation/ui/awards_page.dart
index f7d27b5..cda3c81 100644
--- a/lib/features/awards/presentation/ui/awards_page.dart
+++ b/lib/features/awards/presentation/ui/awards_page.dart
@@ -1,14 +1,33 @@
import 'package:flutter/material.dart';
-import 'package:shia_game_flutter/features/awards/presentation/controller/awards_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/features/awards/presentation/controller/awards_controller.dart';
+import 'package:shia_game_flutter/features/awards/presentation/ui/widgets/award_widget.dart';
class AwardsPage extends GetView {
const AwardsPage({super.key});
@override
Widget build(BuildContext context) {
- return const Center(
- child: Text('Awards Page'),
+ return MyBackground(
+ child: Column(
+ children: [
+ 60.0.gapHeight,
+ AwardWidget(
+ images: controller.leagueAwards,
+ ),
+ MySpaces.s28.gapHeight,
+ AwardWidget(
+ images: controller.customAwards,
+ ),
+ MySpaces.s28.gapHeight,
+ AwardWidget(
+ images: controller.castAwards,
+ ),
+ ],
+ ),
);
}
}
diff --git a/lib/features/awards/presentation/ui/widgets/award_widget.dart b/lib/features/awards/presentation/ui/widgets/award_widget.dart
new file mode 100644
index 0000000..06fe414
--- /dev/null
+++ b/lib/features/awards/presentation/ui/widgets/award_widget.dart
@@ -0,0 +1,186 @@
+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/core/utils/my_localization.dart';
+import 'package:shia_game_flutter/core/utils/page_scalable.dart';
+import 'package:shia_game_flutter/core/utils/screen_size.dart';
+import 'package:shia_game_flutter/core/widgets/container/my_container.dart';
+import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
+import 'package:shia_game_flutter/core/widgets/text/gradient_text.dart';
+
+class AwardWidget extends StatefulWidget {
+ const AwardWidget({super.key, required this.images});
+
+ final List images;
+
+ @override
+ State createState() => _AwardWidgetState();
+}
+
+class _AwardWidgetState extends State {
+ final PageController pageController = PageController(viewportFraction: 0.35);
+ double currentPage = 0;
+
+ void pageControllerListener() {
+ setState(() {
+ currentPage = pageController.page ?? 0;
+ });
+ }
+
+ void goToPrePage() {
+ pageController.previousPage(
+ duration: const Duration(milliseconds: 300),
+ curve: Curves.easeIn,
+ );
+ }
+
+ void goToNextPage() {
+ pageController.nextPage(
+ duration: const Duration(milliseconds: 300),
+ curve: Curves.easeIn,
+ );
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ pageController.addListener(pageControllerListener);
+ }
+
+ @override
+ void dispose() {
+ pageController
+ ..removeListener(pageControllerListener)
+ ..dispose();
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Stack(
+ alignment: Alignment.center,
+ clipBehavior: Clip.none,
+ children: [
+ MyContainer(
+ width: context.widthScreen,
+ borderRadius: const BorderRadius.all(Radius.circular(12)),
+ borderGradient: LinearGradient(
+ begin: Alignment.topCenter,
+ end: Alignment.bottomCenter,
+ colors: [
+ const Color(0XFF7D44CC),
+ const Color(0XFF7D44CC).withValues(alpha: 0),
+ ],
+ ),
+ color: const Color(0XFF2B105A),
+ padding: const EdgeInsets.only(
+ bottom: MySpaces.s10,
+ top: MySpaces.s40,
+ ),
+ child: Column(
+ spacing: MySpaces.s12,
+ children: [
+ SizedBox(
+ height: 100,
+ child: Stack(
+ alignment: Alignment.center,
+ children: [
+ Padding(
+ padding: const EdgeInsets.symmetric(
+ horizontal: MySpaces.s16,
+ ),
+ child: PageView.builder(
+ controller: pageController,
+ itemCount: widget.images.length,
+ physics: const NeverScrollableScrollPhysics(),
+ itemBuilder: (context, index) {
+ return Transform.scale(
+ scale: PageScalable.scale(
+ currentPage: currentPage,
+ index: index,
+ scaleFactor: 0.4,
+ ),
+ child: MyImage(asset: widget.images[index]),
+ );
+ },
+ ),
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ IconButton(
+ onPressed: currentPage == 0 ? null : goToPrePage,
+ icon: const Icon(Icons.keyboard_arrow_left_rounded),
+ iconSize: 30,
+ ),
+ IconButton(
+ onPressed: currentPage == widget.images.length - 1
+ ? null
+ : goToNextPage,
+ icon: const Icon(Icons.keyboard_arrow_right_rounded),
+ iconSize: 30,
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ Column(
+ spacing: MySpaces.s2,
+ children: [
+ Text(
+ context.translate.first_place,
+ style: Lexend.extraBold.copyWith(fontSize: 14),
+ ),
+ GradientText(
+ text: '1ST Week (May 2024)',
+ textStyle: Lexend.semiBold.copyWith(
+ fontSize: 10,
+ shadows: [
+ const BoxShadow(
+ color: Color(0XFF3E1381),
+ offset: Offset(0, 1.69),
+ blurRadius: 0.84,
+ ),
+ ],
+ ),
+ color: const Color(0XFFCAA8FF),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ Positioned(
+ top: -MySpaces.s14,
+ child: Container(
+ padding: const EdgeInsets.symmetric(
+ horizontal: MySpaces.s10,
+ vertical: MySpaces.s6,
+ ),
+ decoration: const BoxDecoration(
+ borderRadius: BorderRadius.all(Radius.circular(12)),
+ color: Color(0XFF7D44CB),
+ ),
+ child: Opacity(
+ opacity: 0.6,
+ child: GradientText(
+ text: context.translate.battle_league_awards,
+ color: const Color(0XFFCAA8FF),
+ textStyle: Lexend.medium.copyWith(
+ fontSize: 14,
+ shadows: [
+ const BoxShadow(
+ color: Color(0XFF3E1381),
+ offset: Offset(0, 0.69),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ),
+ ],
+ );
+ }
+}
diff --git a/lib/features/home/presentation/pages/home_page.dart b/lib/features/home/presentation/pages/home_page.dart
index d3df729..b7af715 100644
--- a/lib/features/home/presentation/pages/home_page.dart
+++ b/lib/features/home/presentation/pages/home_page.dart
@@ -22,14 +22,14 @@ class HomePage extends GetView {
child: Column(
children: [
MySpaces.s28.gapHeight,
- MyImage(asset: MyAssets.shiaMindGroup),
+ const MyImage(asset: MyAssets.shiaMindGroup),
MySpaces.s40.gapHeight,
- HomeMembership(),
- HomeBattleLeague(),
+ const HomeMembership(),
+ const HomeBattleLeague(),
MySpaces.s20.gapHeight,
_customWidgets(context),
MySpaces.s20.gapHeight,
- HomeBattleCast(),
+ const HomeBattleCast(),
],
),
);
diff --git a/lib/features/home/presentation/pages/widgets/enums/custom_widget_type.dart b/lib/features/home/presentation/pages/widgets/enums/custom_widget_type.dart
index cc75f8e..8b3f6c7 100644
--- a/lib/features/home/presentation/pages/widgets/enums/custom_widget_type.dart
+++ b/lib/features/home/presentation/pages/widgets/enums/custom_widget_type.dart
@@ -9,12 +9,12 @@ enum CustomWidgetType {
friendBattle;
static Map get borderGradient => {
- CustomWidgetType.customLeague: LinearGradient(
+ CustomWidgetType.customLeague: const LinearGradient(
begin: AlignmentDirectional.topCenter,
end: AlignmentDirectional.bottomCenter,
colors: [Color(0XFF4BAD42), Color(0XFF147743)],
),
- CustomWidgetType.friendBattle: LinearGradient(
+ CustomWidgetType.friendBattle: const LinearGradient(
begin: AlignmentDirectional.topCenter,
end: AlignmentDirectional.bottomCenter,
colors: [Color(0XFFED9851), Color(0XFFC77041)],
@@ -22,12 +22,12 @@ enum CustomWidgetType {
};
static Map get gradient => {
- CustomWidgetType.customLeague: RadialGradient(
+ CustomWidgetType.customLeague: const RadialGradient(
radius: 0.7,
center: Alignment(-0.6, -0.8),
colors: [Color(0XFF58AE23), Color(0XFF066A36)],
),
- CustomWidgetType.friendBattle: RadialGradient(
+ CustomWidgetType.friendBattle: const RadialGradient(
radius: 0.7,
center: Alignment(-0.6, -0.8),
colors: [Color(0XFFE99E53), Color(0XFFBC673A)],
@@ -40,34 +40,34 @@ enum CustomWidgetType {
};
static Map get containerColor => {
- CustomWidgetType.customLeague: Color(0XFF05542B),
- CustomWidgetType.friendBattle: Color(0XFFA45A31),
+ CustomWidgetType.customLeague: const Color(0XFF05542B),
+ CustomWidgetType.friendBattle: const Color(0XFFA45A31),
};
static Map get firstTextColor => {
- CustomWidgetType.customLeague: Color(0XFF4FDF94),
- CustomWidgetType.friendBattle: Color(0XFFE3DFD5),
+ CustomWidgetType.customLeague: const Color(0XFF4FDF94),
+ CustomWidgetType.friendBattle: const Color(0XFFE3DFD5),
};
static Map get secondTextColor => {
- CustomWidgetType.customLeague: Color(0XFF85C9A6),
- CustomWidgetType.friendBattle: Color(0XFFDFBC9D),
+ CustomWidgetType.customLeague: const Color(0XFF85C9A6),
+ CustomWidgetType.friendBattle: const Color(0XFFDFBC9D),
};
static Map get title => {
CustomWidgetType.customLeague: GradientText(
text: Get.context?.translate.custom_league,
- color: Color(0XFFBEF8DA),
- shadowColor: Color(0xFF07592F),
+ color: const Color(0XFFBEF8DA),
+ shadowColor: const Color(0xFF07592F),
blurRadius: 0.52,
- offset: Offset(0, 1.04),
+ offset: const Offset(0, 1.04),
),
CustomWidgetType.friendBattle: GradientText(
text: Get.context?.translate.friends_battle,
- color: Color(0XFFFFB994),
- shadowColor: Color(0xFFAA5B31),
+ color: const Color(0XFFFFB994),
+ shadowColor: const Color(0xFFAA5B31),
blurRadius: 0.52,
- offset: Offset(0, 1.04),
+ offset: const Offset(0, 1.04),
),
};
}
\ No newline at end of file
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 439f16a..e1c7c26 100644
--- a/lib/features/home/presentation/pages/widgets/home_battle_cast.dart
+++ b/lib/features/home/presentation/pages/widgets/home_battle_cast.dart
@@ -22,20 +22,20 @@ class HomeBattleCast extends StatelessWidget {
children: [
MyContainer(
height: 120,
- borderRadius: BorderRadius.all(Radius.circular(MySpaces.s20)),
- borderGradient: LinearGradient(
+ borderRadius: const BorderRadius.all(Radius.circular(MySpaces.s20)),
+ borderGradient: const LinearGradient(
begin: AlignmentDirectional.topCenter,
end: AlignmentDirectional.bottomCenter,
colors: [Color(0XFF567EFF), Color(0XFF304DB8)],
),
gradient: RadialGradient(
radius: 1,
- center: Alignment(-0.5, -1),
- colors: [Color(0XFF104CBA).withValues(alpha: 0.2), Color(0XFF104CBA)],
+ center: const Alignment(-0.5, -1),
+ colors: [const Color(0XFF104CBA).withValues(alpha: 0.2), const Color(0XFF104CBA)],
),
- padding: EdgeInsets.all(MySpaces.s10),
+ padding: const EdgeInsets.all(MySpaces.s10),
image: DecorationImage(
- image: AssetImage(MyAssets.addBackground),
+ image: const AssetImage(MyAssets.addBackground),
repeat: ImageRepeat.repeat,
colorFilter: ColorFilter.mode(
Colors.black.withValues(alpha: 0.02),
@@ -48,23 +48,23 @@ class HomeBattleCast extends StatelessWidget {
children: [
GradientText(
text: context.translate.battle_cast,
- color: Color(0XFFE4E3FF),
- offset: Offset(0, 1.04),
+ color: const Color(0XFFE4E3FF),
+ offset: const Offset(0, 1.04),
blurRadius: 0.52,
- shadowColor: Color(0xFF3C38C4),
+ shadowColor: const Color(0xFF3C38C4),
fontSize: 22,
),
MySpaces.s10.gapHeight,
Container(
- padding: EdgeInsets.all(5),
+ padding: const EdgeInsets.all(5),
decoration: BoxDecoration(
- borderRadius: BorderRadius.all(Radius.circular(8)),
- color: Color(0XFF203689),
+ borderRadius: const BorderRadius.all(Radius.circular(8)),
+ color: const Color(0XFF203689),
boxShadow: [
BoxShadow(
- color: Color(0XFF000000).withValues(alpha: 0.3),
+ color: const Color(0XFF000000).withValues(alpha: 0.3),
blurRadius: 3,
- offset: Offset(0, 2),
+ offset: const Offset(0, 2),
inset: true,
),
],
@@ -74,7 +74,7 @@ class HomeBattleCast extends StatelessWidget {
maxLines: 1,
style: Lexend.semiBold.copyWith(
fontSize: 8,
- color: Color(0XFFB6B3FF),
+ color: const Color(0XFFB6B3FF),
),
),
),
@@ -85,12 +85,12 @@ class HomeBattleCast extends StatelessWidget {
start: -1,
top: -MySpaces.s4,
child: MyContainer(
- color: Color(0XFFCC9B22),
- padding: EdgeInsets.symmetric(
+ color: const Color(0XFFCC9B22),
+ padding: const EdgeInsets.symmetric(
vertical: MySpaces.s2,
horizontal: MySpaces.s8,
),
- borderRadius: BorderRadiusDirectional.only(
+ borderRadius: const BorderRadiusDirectional.only(
topStart: Radius.circular(6),
topEnd: Radius.circular(6),
bottomStart: Radius.circular(0),
@@ -104,7 +104,7 @@ class HomeBattleCast extends StatelessWidget {
),
),
),
- PositionedDirectional(
+ const PositionedDirectional(
end: MySpaces.s20,
top: -MySpaces.s10,
child: Row(
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 579f51e..76093b1 100644
--- a/lib/features/home/presentation/pages/widgets/home_battle_league.dart
+++ b/lib/features/home/presentation/pages/widgets/home_battle_league.dart
@@ -20,21 +20,21 @@ class HomeBattleLeague extends StatelessWidget {
MyContainer(
width: context.widthScreen,
height: 120,
- padding: EdgeInsets.symmetric(
+ padding: const EdgeInsets.symmetric(
horizontal: MySpaces.s12,
vertical: MySpaces.s16,
),
- borderGradient: LinearGradient(
+ borderGradient: const LinearGradient(
begin: AlignmentDirectional.centerStart,
end: AlignmentDirectional.centerEnd,
colors: [Color(0XFF3A0A85), Color(0XFF6C2ECD)],
),
- gradient: LinearGradient(
+ gradient: const LinearGradient(
begin: AlignmentDirectional.centerStart,
end: AlignmentDirectional.centerEnd,
colors: [Color(0XFF3A0D83), Color(0XFF4F09BF)],
),
- borderRadius: BorderRadius.all(Radius.circular(20)),
+ borderRadius: const BorderRadius.all(Radius.circular(20)),
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.start,
@@ -42,23 +42,23 @@ class HomeBattleLeague extends StatelessWidget {
context.widthScreen.gapWidth,
GradientText(
text: context.translate.battle_league,
- color: Color(0XFFCAA8FF),
- shadowColor: Color(0xFF3E1381),
+ color: const Color(0XFFCAA8FF),
+ shadowColor: const Color(0xFF3E1381),
blurRadius: 0.84,
- offset: Offset(0, 1.69),
+ offset: const Offset(0, 1.69),
fontSize: 22,
),
Text(
context.translate.answer_win,
style: Lexend.medium.copyWith(
fontSize: 10,
- color: Color(0XFFA183D2),
+ color: const Color(0XFFA183D2),
),
),
],
),
),
- MyImage(asset: MyAssets.cup),
+ const MyImage(asset: MyAssets.cup),
],
);
}
diff --git a/lib/features/home/presentation/pages/widgets/home_custom_widget.dart b/lib/features/home/presentation/pages/widgets/home_custom_widget.dart
index eeaf067..0f51387 100644
--- a/lib/features/home/presentation/pages/widgets/home_custom_widget.dart
+++ b/lib/features/home/presentation/pages/widgets/home_custom_widget.dart
@@ -25,18 +25,18 @@ class HomeCustomWidget extends StatelessWidget {
Widget build(BuildContext context) {
return MyContainer(
height: 130,
- borderRadius: BorderRadius.all(Radius.circular(20)),
+ borderRadius: const BorderRadius.all(Radius.circular(20)),
borderGradient: CustomWidgetType.borderGradient[type],
gradient: CustomWidgetType.gradient[type],
image: DecorationImage(
- image: AssetImage(MyAssets.addBackground),
+ image: const AssetImage(MyAssets.addBackground),
repeat: ImageRepeat.repeat,
colorFilter: ColorFilter.mode(
Colors.black.withValues(alpha: 0.02),
BlendMode.srcIn,
),
),
- padding: EdgeInsets.all(MySpaces.s10),
+ padding: const EdgeInsets.all(MySpaces.s10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -44,20 +44,20 @@ class HomeCustomWidget extends StatelessWidget {
alignment: AlignmentDirectional.centerEnd,
child: MyImage(asset: CustomWidgetType.image[type] ?? '',),
),
- Spacer(),
- CustomWidgetType.title[type] ?? SizedBox.shrink(),
+ const Spacer(),
+ CustomWidgetType.title[type] ?? const SizedBox.shrink(),
MySpaces.s10.gapHeight,
Container(
- padding: EdgeInsets.all(5),
+ padding: const EdgeInsets.all(5),
width: context.widthScreen,
decoration: BoxDecoration(
- borderRadius: BorderRadius.all(Radius.circular(8)),
+ borderRadius: const BorderRadius.all(Radius.circular(8)),
color: CustomWidgetType.containerColor[type],
boxShadow: [
BoxShadow(
- color: Color(0XFF000000).withValues(alpha: 0.3),
+ color: const Color(0XFF000000).withValues(alpha: 0.3),
blurRadius: 3,
- offset: Offset(0, 2),
+ offset: const Offset(0, 2),
inset: true,
),
],
diff --git a/lib/features/home/presentation/pages/widgets/home_membership.dart b/lib/features/home/presentation/pages/widgets/home_membership.dart
index b5bd6c3..acbc960 100644
--- a/lib/features/home/presentation/pages/widgets/home_membership.dart
+++ b/lib/features/home/presentation/pages/widgets/home_membership.dart
@@ -22,33 +22,33 @@ class HomeMembership extends StatelessWidget {
begin: AlignmentDirectional.topStart,
end: AlignmentDirectional.bottomEnd,
colors: [
- Color(0XFFDE8B4D).withValues(alpha: 0.3),
- Color(0XFFDE8B4D).withValues(alpha: 0.05),
+ const Color(0XFFDE8B4D).withValues(alpha: 0.3),
+ const Color(0XFFDE8B4D).withValues(alpha: 0.05),
],
),
- borderRadius: BorderRadius.all(Radius.circular(MySpaces.s20)),
+ borderRadius: const BorderRadius.all(Radius.circular(MySpaces.s20)),
boxShadow: [
- BoxShadow(
+ const BoxShadow(
color: MyColors.black,
blurRadius: 17,
offset: Offset(0, 4),
spreadRadius: 20,
),
],
- padding: EdgeInsets.symmetric(horizontal: MySpaces.s16, vertical: 13),
+ padding: const EdgeInsets.symmetric(horizontal: MySpaces.s16, vertical: 13),
child: Row(
children: [
- MyImage(asset: MyAssets.iconCrown),
+ const MyImage(asset: MyAssets.iconCrown),
MySpaces.s8.gapWidth,
Text(
context.translate.pro_membership,
style: Lexend.semiBold.copyWith(
fontSize: 12,
- color: Color(0XFFFCC230),
+ color: const Color(0XFFFCC230),
),
),
- Spacer(),
- MyImage(asset: MyAssets.iconClock),
+ const Spacer(),
+ const MyImage(asset: MyAssets.iconClock),
MySpaces.s6.gapWidth,
Text('125d 4h', style: Lexend.semiBold.copyWith(fontSize: 12)),
],
diff --git a/lib/features/intro/presentation/ui/intro_page.dart b/lib/features/intro/presentation/ui/intro_page.dart
index 1facbae..780ca54 100644
--- a/lib/features/intro/presentation/ui/intro_page.dart
+++ b/lib/features/intro/presentation/ui/intro_page.dart
@@ -40,7 +40,7 @@ class IntroPage extends GetView {
}
Stack _logo(BuildContext context) {
- return Stack(
+ return const Stack(
clipBehavior: Clip.none,
alignment: Alignment.center,
children: [
@@ -113,7 +113,7 @@ class IntroPage extends GetView {
context.translate.loading,
style: Lexend.regular.copyWith(fontSize: MySpaces.s14),
),
- IntroLoading(),
+ const IntroLoading(),
],
),
);
diff --git a/lib/features/intro/presentation/ui/widgets/intro_loading.dart b/lib/features/intro/presentation/ui/widgets/intro_loading.dart
index 6c806c8..d165b97 100644
--- a/lib/features/intro/presentation/ui/widgets/intro_loading.dart
+++ b/lib/features/intro/presentation/ui/widgets/intro_loading.dart
@@ -11,13 +11,13 @@ class IntroLoading extends StatelessWidget {
return Container(
width: 188,
height: MySpaces.s16,
- padding: EdgeInsetsDirectional.only(
+ padding: const EdgeInsetsDirectional.only(
start: MySpaces.s2,
top: MySpaces.s2,
bottom: MySpaces.s2,
end: MySpaces.s20,
),
- decoration: ShapeDecoration(
+ decoration: const ShapeDecoration(
shape: StadiumBorder(
side: BorderSide(
width: 1,
@@ -34,7 +34,7 @@ class IntroLoading extends StatelessWidget {
color: Colors.white.withValues(alpha: 0.5),
),
),
- gradient: LinearGradient(
+ gradient: const LinearGradient(
begin: AlignmentDirectional.centerStart,
end: AlignmentDirectional.centerEnd,
colors: [
diff --git a/lib/features/master/presentation/ui/master_page.dart b/lib/features/master/presentation/ui/master_page.dart
index 064d78f..d47546c 100644
--- a/lib/features/master/presentation/ui/master_page.dart
+++ b/lib/features/master/presentation/ui/master_page.dart
@@ -12,8 +12,8 @@ class MasterPage extends GetView {
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
- appBar: MasterAppBar(),
- bottomNavigationBar: BottomNavBar(),
+ appBar: const MasterAppBar(),
+ bottomNavigationBar: const BottomNavBar(),
body: GetRouterOutlet(
initialRoute: Routes.homePage,
anchorRoute: Routes.masterPage,
diff --git a/lib/features/profile/presentation/ui/profile_page.dart b/lib/features/profile/presentation/ui/profile_page.dart
index f004afe..bd876f4 100644
--- a/lib/features/profile/presentation/ui/profile_page.dart
+++ b/lib/features/profile/presentation/ui/profile_page.dart
@@ -21,7 +21,7 @@ class ProfilePage extends GetView {
child: Column(
children: [
60.0.gapHeight,
- ProfileAvatar(),
+ const ProfileAvatar(),
_changeProfileBtn(context),
MySpaces.s40.gapHeight,
_userNameInput(context),
@@ -59,13 +59,13 @@ class ProfilePage extends GetView {
hintText: 'Iran - Tehran',
),
),
- ProfileLocation(),
+ const ProfileLocation(),
],
);
}
Row _bottomButtons() {
- return Row(
+ return const Row(
spacing: MySpaces.s20,
children: [
Expanded(child: ProfileDeleteAccount()),
diff --git a/lib/features/profile/presentation/ui/widgets/profile_avatar.dart b/lib/features/profile/presentation/ui/widgets/profile_avatar.dart
index 9b3c167..a415d4d 100644
--- a/lib/features/profile/presentation/ui/widgets/profile_avatar.dart
+++ b/lib/features/profile/presentation/ui/widgets/profile_avatar.dart
@@ -15,7 +15,7 @@ class ProfileAvatar extends StatelessWidget {
shape: BoxShape.circle,
border: Border.all(width: 2.5, color: context.primaryColor),
),
- child: MyImage(asset: MyAssets.sampleAvatar),
+ child: const 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
index 3969223..bf95fa4 100644
--- a/lib/features/profile/presentation/ui/widgets/profile_delete_account.dart
+++ b/lib/features/profile/presentation/ui/widgets/profile_delete_account.dart
@@ -13,17 +13,17 @@ class ProfileDeleteAccount extends StatelessWidget {
return MyContainer(
height: 58,
onTap: () {},
- borderRadius: BorderRadius.all(Radius.circular(MySpaces.s12)),
+ borderRadius: const 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),
+ const Color(0XFF7E94B4).withValues(alpha: 0.3),
+ const Color(0XFF304053).withValues(alpha: 0),
],
),
- padding: EdgeInsets.symmetric(
+ padding: const EdgeInsets.symmetric(
vertical: MySpaces.s16,
horizontal: MySpaces.s28,
),
@@ -31,7 +31,7 @@ class ProfileDeleteAccount extends StatelessWidget {
child: Text(
context.translate.delete_account,
maxLines: 1,
- style: Lexend.semiBold.copyWith(fontSize: 14, color: Color(0XFF5F5F88)),
+ style: Lexend.semiBold.copyWith(fontSize: 14, color: const Color(0XFF5F5F88)),
),
),
);
diff --git a/lib/features/profile/presentation/ui/widgets/profile_location.dart b/lib/features/profile/presentation/ui/widgets/profile_location.dart
index e7f9d7f..b32e50e 100644
--- a/lib/features/profile/presentation/ui/widgets/profile_location.dart
+++ b/lib/features/profile/presentation/ui/widgets/profile_location.dart
@@ -12,9 +12,9 @@ class ProfileLocation extends StatelessWidget {
onTap: () {},
width: 48,
height: 48,
- color: Color(0XFF5715BF),
- borderRadius: BorderRadius.all(Radius.circular(12)),
- child: MyImage(asset: MyAssets.iconLocation),
+ color: const Color(0XFF5715BF),
+ borderRadius: const BorderRadius.all(Radius.circular(12)),
+ child: const 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
index 8f3758c..3021ae7 100644
--- a/lib/features/profile/presentation/ui/widgets/profile_logout.dart
+++ b/lib/features/profile/presentation/ui/widgets/profile_logout.dart
@@ -14,9 +14,9 @@ class ProfileLogout extends StatelessWidget {
return MyContainer(
height: 58,
onTap: () {},
- borderRadius: BorderRadius.all(Radius.circular(MySpaces.s12)),
- color: Color(0XFF270A59),
- padding: EdgeInsets.symmetric(
+ borderRadius: const BorderRadius.all(Radius.circular(MySpaces.s12)),
+ color: const Color(0XFF270A59),
+ padding: const EdgeInsets.symmetric(
vertical: MySpaces.s16,
horizontal: MySpaces.s28,
),
@@ -24,7 +24,7 @@ class ProfileLogout extends StatelessWidget {
spacing: MySpaces.s10,
mainAxisAlignment: MainAxisAlignment.center,
children: [
- MyImage(asset: MyAssets.iconLogout),
+ const MyImage(asset: MyAssets.iconLogout),
FittedBox(
child: Text(
context.translate.logout,
diff --git a/lib/features/shop/data/model/shop_model.dart b/lib/features/shop/data/model/shop_model.dart
index 362e5df..2c3bfe8 100644
--- a/lib/features/shop/data/model/shop_model.dart
+++ b/lib/features/shop/data/model/shop_model.dart
@@ -4,6 +4,6 @@ class ShopModel extends ShopEntity {
const ShopModel();
factory ShopModel.fromJson(Map json) {
- return ShopModel();
+ return const ShopModel();
}
}
diff --git a/lib/features/shop/presentation/controller/shop_controller.dart b/lib/features/shop/presentation/controller/shop_controller.dart
index ba997a3..88ca9d8 100644
--- a/lib/features/shop/presentation/controller/shop_controller.dart
+++ b/lib/features/shop/presentation/controller/shop_controller.dart
@@ -33,7 +33,7 @@ class ShopController extends GetxController with StateMixin {
/// ----- Variables -----
final Rx shopParams = Rx(ShopParams());
final RxList shopList = RxList([
- ShopPackageEntity(
+ const ShopPackageEntity(
title: 'Gem Package',
shopList: [
GemEntity(number: 30, image: MyAssets.gem1, price: 12),
@@ -42,7 +42,7 @@ class ShopController extends GetxController with StateMixin {
GemEntity(number: 270, image: MyAssets.gem4, price: 96),
],
),
- ShopPackageEntity(
+ const ShopPackageEntity(
title: 'Boost Package',
shopList: [
BoostEntity(number: 10, image: MyAssets.boost1, price: 10),
@@ -51,7 +51,7 @@ class ShopController extends GetxController with StateMixin {
BoostEntity(number: 40, image: MyAssets.boost4, price: 40),
],
),
- ShopPackageEntity(
+ const ShopPackageEntity(
title: 'Character Package',
shopList: [
CharacterEntity(image: MyAssets.character1, price: 12, isActive: true, isBuy: true),
@@ -60,7 +60,7 @@ class ShopController extends GetxController with StateMixin {
CharacterEntity(image: MyAssets.character1, price: 12, isActive: false, isBuy: false),
],
),
- ShopPackageEntity(
+ const ShopPackageEntity(
title: 'Books',
shopList: [
BookEntity(image: MyAssets.book1, title: 'Super Stories of the Prophets'),
@@ -68,7 +68,7 @@ class ShopController extends GetxController with StateMixin {
BookEntity(image: MyAssets.book3, title: 'Super Stories of the Prophets'),
],
),
- ShopPackageEntity(
+ const ShopPackageEntity(
title: 'Pro Membership',
shopList: [
ProMembershipEntity(image: MyAssets.member1, price: 2.5, number: 1),
diff --git a/lib/features/shop/presentation/ui/shop_page.dart b/lib/features/shop/presentation/ui/shop_page.dart
index d26eba5..a7bef9c 100644
--- a/lib/features/shop/presentation/ui/shop_page.dart
+++ b/lib/features/shop/presentation/ui/shop_page.dart
@@ -15,7 +15,7 @@ class ShopPage extends GetView {
listChild: Obx(
() => ListView.separated(
itemCount: controller.shopList.length,
- padding: EdgeInsets.only(
+ padding: const EdgeInsets.only(
left: MySpaces.s30,
right: MySpaces.s30,
bottom: MySpaces.s30,
diff --git a/lib/features/shop/presentation/ui/widgets/shop_item/shop_item_widget.dart b/lib/features/shop/presentation/ui/widgets/shop_item/shop_item_widget.dart
index 8a87663..609f347 100644
--- a/lib/features/shop/presentation/ui/widgets/shop_item/shop_item_widget.dart
+++ b/lib/features/shop/presentation/ui/widgets/shop_item/shop_item_widget.dart
@@ -19,14 +19,14 @@ class ShopItemWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MyContainer(
- color: Color(0XFF1B0B38),
- borderColor: Color(0XFF462A79),
- borderRadius: BorderRadius.all(Radius.circular(MySpaces.s14)),
- padding: EdgeInsets.all(MySpaces.s12),
+ color: const Color(0XFF1B0B38),
+ borderColor: const Color(0XFF462A79),
+ borderRadius: const BorderRadius.all(Radius.circular(MySpaces.s14)),
+ padding: const EdgeInsets.all(MySpaces.s12),
child: MyContainer(
- color: Color(0XFF070D1C),
- borderRadius: BorderRadius.all(Radius.circular(7)),
- padding: EdgeInsets.all(7),
+ color: const Color(0XFF070D1C),
+ borderRadius: const BorderRadius.all(Radius.circular(7)),
+ padding: const EdgeInsets.all(7),
child: switch(shop.type) {
ShopType.gem => GemStyle(shop: shop),
ShopType.boost => BoostStyle(shop: shop),
diff --git a/lib/features/shop/presentation/ui/widgets/shop_item/styles/book_style.dart b/lib/features/shop/presentation/ui/widgets/shop_item/styles/book_style.dart
index 536347a..13b4447 100644
--- a/lib/features/shop/presentation/ui/widgets/shop_item/styles/book_style.dart
+++ b/lib/features/shop/presentation/ui/widgets/shop_item/styles/book_style.dart
@@ -23,10 +23,10 @@ class BookStyle extends StatelessWidget {
child: Container(
decoration: BoxDecoration(
border: Border.all(width: 2, color: context.primaryColor),
- borderRadius: BorderRadius.all(Radius.circular(8)),
+ borderRadius: const BorderRadius.all(Radius.circular(8)),
),
child: ClipRRect(
- borderRadius: BorderRadius.all(Radius.circular(6)),
+ borderRadius: const BorderRadius.all(Radius.circular(6)),
child: MyImage(
asset: shop.image ?? '',
size: 110,
diff --git a/lib/features/shop/presentation/ui/widgets/shop_item/styles/boost_style.dart b/lib/features/shop/presentation/ui/widgets/shop_item/styles/boost_style.dart
index 6932c51..38f9eee 100644
--- a/lib/features/shop/presentation/ui/widgets/shop_item/styles/boost_style.dart
+++ b/lib/features/shop/presentation/ui/widgets/shop_item/styles/boost_style.dart
@@ -20,9 +20,9 @@ class BoostStyle extends StatelessWidget {
GradientText(
text: '${shop.number} ${shop.title}',
fontSize: 18,
- color: Color(0XFF9C8CC2),
- shadowColor: Color(0XFF1B0D31),
- offset: Offset(0, 1.69),
+ color: const Color(0XFF9C8CC2),
+ shadowColor: const Color(0XFF1B0D31),
+ offset: const Offset(0, 1.69),
),
Expanded(
child: MyImage(
@@ -35,7 +35,7 @@ class BoostStyle extends StatelessWidget {
onTap: () {},
title: '${shop.price?.priceFormat}',
fontSize: 20,
- icon: MyImage(asset: MyAssets.gem),
+ icon: const MyImage(asset: MyAssets.gem),
),
],
),
diff --git a/lib/features/shop/presentation/ui/widgets/shop_item/styles/character_style.dart b/lib/features/shop/presentation/ui/widgets/shop_item/styles/character_style.dart
index 6dc2440..cc97c07 100644
--- a/lib/features/shop/presentation/ui/widgets/shop_item/styles/character_style.dart
+++ b/lib/features/shop/presentation/ui/widgets/shop_item/styles/character_style.dart
@@ -24,13 +24,13 @@ class CharacterStyle extends StatelessWidget {
Expanded(
child: AnimatedContainer(
width: 118,
- duration: Duration(milliseconds: 200),
+ duration: const Duration(milliseconds: 200),
decoration: BoxDecoration(
- border:Border.all(width: 2, color: Color(0xFFB37EFA)),
- borderRadius: BorderRadius.all(Radius.circular(8)),
+ border:Border.all(width: 2, color: const Color(0xFFB37EFA)),
+ borderRadius: const BorderRadius.all(Radius.circular(8)),
boxShadow: shop.isActive == true
? [
- BoxShadow(
+ const BoxShadow(
color: Color(0xFFB37EFA),
spreadRadius: 0,
blurRadius: 22,
@@ -40,7 +40,7 @@ class CharacterStyle extends StatelessWidget {
: null,
),
child: ClipRRect(
- borderRadius: BorderRadius.all(Radius.circular(6)),
+ borderRadius: const BorderRadius.all(Radius.circular(6)),
child: Stack(
alignment: AlignmentDirectional.bottomEnd,
children: [
@@ -56,13 +56,13 @@ class CharacterStyle extends StatelessWidget {
height: 42,
width: 42,
decoration: BoxDecoration(
- borderRadius: BorderRadius.all(
+ borderRadius: const BorderRadius.all(
Radius.circular(5),
),
color: MyColors.black.withValues(alpha: 0.8),
),
),
- PositionedDirectional(
+ const PositionedDirectional(
top: -0,
end: -5,
child: MyImage(asset: MyAssets.done),
@@ -77,14 +77,14 @@ class CharacterStyle extends StatelessWidget {
child: Container(
height: 42,
width: 42,
- padding: EdgeInsets.all(MySpaces.s10),
+ padding: const EdgeInsets.all(MySpaces.s10),
decoration: BoxDecoration(
- borderRadius: BorderRadius.all(
+ borderRadius: const BorderRadius.all(
Radius.circular(5),
),
color: MyColors.black.withValues(alpha: 0.8),
),
- child: MyImage(
+ child: const MyImage(
asset: MyAssets.lock,
),
),
@@ -101,7 +101,7 @@ class CharacterStyle extends StatelessWidget {
: shop.isBuy == true
? context.translate.select
: '${shop.price?.priceFormat}',
- icon: shop.isBuy == true ? null : MyImage(asset: MyAssets.gem),
+ icon: shop.isBuy == true ? null : const MyImage(asset: MyAssets.gem),
fontSize: 20,
type: shop.isActive == true
? MyButtonType.activeType
diff --git a/lib/features/shop/presentation/ui/widgets/shop_item/styles/gem_style.dart b/lib/features/shop/presentation/ui/widgets/shop_item/styles/gem_style.dart
index 35e1aa6..613c002 100644
--- a/lib/features/shop/presentation/ui/widgets/shop_item/styles/gem_style.dart
+++ b/lib/features/shop/presentation/ui/widgets/shop_item/styles/gem_style.dart
@@ -19,9 +19,9 @@ class GemStyle extends StatelessWidget {
GradientText(
text: '${shop.number} ${shop.title}',
fontSize: 18,
- color: Color(0XFF9C8CC2),
- shadowColor: Color(0XFF1B0D31),
- offset: Offset(0, 1.69),
+ color: const Color(0XFF9C8CC2),
+ shadowColor: const Color(0XFF1B0D31),
+ offset: const Offset(0, 1.69),
),
Expanded(
child: MyImage(
diff --git a/lib/features/shop/presentation/ui/widgets/shop_item/styles/pro_membership_style.dart b/lib/features/shop/presentation/ui/widgets/shop_item/styles/pro_membership_style.dart
index 8943b87..75b3828 100644
--- a/lib/features/shop/presentation/ui/widgets/shop_item/styles/pro_membership_style.dart
+++ b/lib/features/shop/presentation/ui/widgets/shop_item/styles/pro_membership_style.dart
@@ -20,9 +20,9 @@ class ProMembershipStyle extends StatelessWidget {
GradientText(
text: '${shop.number} ${shop.title}',
fontSize: 18,
- color: Color(0XFF9C8CC2),
- shadowColor: Color(0XFF1B0D31),
- offset: Offset(0, 1.69),
+ color: const Color(0XFF9C8CC2),
+ shadowColor: const Color(0XFF1B0D31),
+ offset: const Offset(0, 1.69),
),
MyImage(
asset: shop.image ?? '',
diff --git a/lib/features/shop/presentation/ui/widgets/shop_package_entity.dart b/lib/features/shop/presentation/ui/widgets/shop_package_entity.dart
index fa8dca4..384734a 100644
--- a/lib/features/shop/presentation/ui/widgets/shop_package_entity.dart
+++ b/lib/features/shop/presentation/ui/widgets/shop_package_entity.dart
@@ -19,8 +19,8 @@ class ShopPackageWidget extends StatelessWidget {
Widget build(BuildContext context) {
return MyContainer(
width: context.widthScreen,
- borderRadius: BorderRadius.all(Radius.circular(12)),
- gradient: LinearGradient(
+ borderRadius: const BorderRadius.all(Radius.circular(12)),
+ gradient: const LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [Color(0XFF411183), Color(0XFF2F0E5C)],
@@ -28,9 +28,9 @@ class ShopPackageWidget extends StatelessWidget {
borderGradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
- colors: [Color(0XFF7D44CC), Color(0XFF7D44CC).withValues(alpha: 0)],
+ colors: [const Color(0XFF7D44CC), const Color(0XFF7D44CC).withValues(alpha: 0)],
),
- padding: EdgeInsets.all(MySpaces.s10),
+ padding: const EdgeInsets.all(MySpaces.s10),
child: Column(
children: [
Stack(
@@ -41,14 +41,14 @@ class ShopPackageWidget extends StatelessWidget {
child: GradientText(
textAlign: TextAlign.center,
text: shopPackage.title,
- color: Color(0XFFCAA8FF),
- shadowColor: Color(0XFF3E1381),
- offset: Offset(0, 1.69),
+ color: const Color(0XFFCAA8FF),
+ shadowColor: const Color(0XFF3E1381),
+ offset: const Offset(0, 1.69),
blurRadius: 0.84,
fontSize: 22,
),
),
- PositionedDirectional(
+ const PositionedDirectional(
end: 0,
child: MyImage(asset: MyAssets.iconInfo),
),
@@ -66,7 +66,7 @@ class ShopPackageWidget extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
children: [
ShopItemWidget(
- shop: shopPackage.shopList?[index] ?? ShopEntity(),
+ shop: shopPackage.shopList?[index] ?? const ShopEntity(),
),
],
),
diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb
index dbb8f6e..f761f5f 100644
--- a/lib/l10n/app_en.arb
+++ b/lib/l10n/app_en.arb
@@ -20,5 +20,13 @@
"battle_cast": "Battle Cast",
"no_one_online": "No one's online",
"active": "Active",
- "select": "Select"
+ "select": "Select",
+ "battle_league_awards": "Battle League Awards",
+ "custom_league_awards": "Custom League Awards",
+ "battle_cast_swards": "Custom Cast Awards",
+ "first_place": "First Place",
+ "second_place": "Second Place",
+ "third_place": "Third Place",
+ "week": "Week",
+ "do_not_have_award": "Don't Have Award"
}
\ No newline at end of file
diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart
index b782c96..a9d3172 100644
--- a/lib/l10n/app_localizations.dart
+++ b/lib/l10n/app_localizations.dart
@@ -219,6 +219,54 @@ abstract class AppLocalizations {
/// In en, this message translates to:
/// **'Select'**
String get select;
+
+ /// No description provided for @battle_league_awards.
+ ///
+ /// In en, this message translates to:
+ /// **'Battle League Awards'**
+ String get battle_league_awards;
+
+ /// No description provided for @custom_league_awards.
+ ///
+ /// In en, this message translates to:
+ /// **'Custom League Awards'**
+ String get custom_league_awards;
+
+ /// No description provided for @battle_cast_swards.
+ ///
+ /// In en, this message translates to:
+ /// **'Custom Cast Awards'**
+ String get battle_cast_swards;
+
+ /// No description provided for @first_place.
+ ///
+ /// In en, this message translates to:
+ /// **'First Place'**
+ String get first_place;
+
+ /// No description provided for @second_place.
+ ///
+ /// In en, this message translates to:
+ /// **'Second Place'**
+ String get second_place;
+
+ /// No description provided for @third_place.
+ ///
+ /// In en, this message translates to:
+ /// **'Third Place'**
+ String get third_place;
+
+ /// No description provided for @week.
+ ///
+ /// In en, this message translates to:
+ /// **'Week'**
+ String get week;
+
+ /// No description provided for @do_not_have_award.
+ ///
+ /// In en, this message translates to:
+ /// **'Don\'t Have Award'**
+ String get do_not_have_award;
}
class _AppLocalizationsDelegate
diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart
index a3f8e1d..23f7712 100644
--- a/lib/l10n/app_localizations_en.dart
+++ b/lib/l10n/app_localizations_en.dart
@@ -70,4 +70,28 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get select => 'Select';
+
+ @override
+ String get battle_league_awards => 'Battle League Awards';
+
+ @override
+ String get custom_league_awards => 'Custom League Awards';
+
+ @override
+ String get battle_cast_swards => 'Custom Cast Awards';
+
+ @override
+ String get first_place => 'First Place';
+
+ @override
+ String get second_place => 'Second Place';
+
+ @override
+ String get third_place => 'Third Place';
+
+ @override
+ String get week => 'Week';
+
+ @override
+ String get do_not_have_award => 'Don\'t Have Award';
}