Browse Source

fixed: const used

pull/5/head
AmirrezaChegini 4 weeks ago
parent
commit
e8430c17c7
  1. 12
      lib/core/widgets/app_bar/master_app_bar.dart
  2. 6
      lib/core/widgets/app_bar/styles/app_bar_action.dart
  3. 10
      lib/core/widgets/app_bar/styles/app_bar_add_widget.dart
  4. 2
      lib/core/widgets/background/my_background.dart
  5. 4
      lib/core/widgets/bottom_nav_bar/bottom_nav_bar.dart
  6. 4
      lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_profile_item.dart
  7. 18
      lib/core/widgets/button/styles/active_style.dart
  8. 14
      lib/core/widgets/button/styles/default_style.dart
  9. 6
      lib/core/widgets/container/my_container.dart
  10. 8
      lib/core/widgets/input/my_input.dart
  11. 8
      lib/features/home/presentation/pages/home_page.dart
  12. 32
      lib/features/home/presentation/pages/widgets/enums/custom_widget_type.dart
  13. 38
      lib/features/home/presentation/pages/widgets/home_battle_cast.dart
  14. 18
      lib/features/home/presentation/pages/widgets/home_battle_league.dart
  15. 18
      lib/features/home/presentation/pages/widgets/home_custom_widget.dart
  16. 18
      lib/features/home/presentation/pages/widgets/home_membership.dart
  17. 4
      lib/features/intro/presentation/ui/intro_page.dart
  18. 6
      lib/features/intro/presentation/ui/widgets/intro_loading.dart
  19. 4
      lib/features/master/presentation/ui/master_page.dart
  20. 6
      lib/features/profile/presentation/ui/profile_page.dart
  21. 2
      lib/features/profile/presentation/ui/widgets/profile_avatar.dart
  22. 10
      lib/features/profile/presentation/ui/widgets/profile_delete_account.dart
  23. 6
      lib/features/profile/presentation/ui/widgets/profile_location.dart
  24. 8
      lib/features/profile/presentation/ui/widgets/profile_logout.dart
  25. 2
      lib/features/shop/data/model/shop_model.dart
  26. 10
      lib/features/shop/presentation/controller/shop_controller.dart
  27. 2
      lib/features/shop/presentation/ui/shop_page.dart
  28. 14
      lib/features/shop/presentation/ui/widgets/shop_item/shop_item_widget.dart
  29. 4
      lib/features/shop/presentation/ui/widgets/shop_item/styles/book_style.dart
  30. 8
      lib/features/shop/presentation/ui/widgets/shop_item/styles/boost_style.dart
  31. 22
      lib/features/shop/presentation/ui/widgets/shop_item/styles/character_style.dart
  32. 6
      lib/features/shop/presentation/ui/widgets/shop_item/styles/gem_style.dart
  33. 6
      lib/features/shop/presentation/ui/widgets/shop_item/styles/pro_membership_style.dart
  34. 18
      lib/features/shop/presentation/ui/widgets/shop_package_entity.dart

12
lib/core/widgets/app_bar/master_app_bar.dart

@ -23,8 +23,8 @@ class MasterAppBar extends StatelessWidget implements PreferredSizeWidget {
icon: MyAssets.iconDiamond, icon: MyAssets.iconDiamond,
number: 999, number: 999,
gradientColors: [ gradientColors: [
Color(0XFF52C3ED),
Color(0XFF4F16A0),
const Color(0XFF52C3ED),
const Color(0XFF4F16A0),
], ],
), ),
MySpaces.s6.gapWidth, MySpaces.s6.gapWidth,
@ -33,11 +33,11 @@ class MasterAppBar extends StatelessWidget implements PreferredSizeWidget {
icon: MyAssets.iconFlash, icon: MyAssets.iconFlash,
number: 54, number: 54,
gradientColors: [ gradientColors: [
Color(0XFFEFB345),
Color(0XFF4F16A0),
const Color(0XFFEFB345),
const Color(0XFF4F16A0),
], ],
), ),
Spacer(),
const Spacer(),
AppBarAction( AppBarAction(
icon: MyAssets.iconShare, icon: MyAssets.iconShare,
onTap: () {}, onTap: () {},
@ -53,5 +53,5 @@ class MasterAppBar extends StatelessWidget implements PreferredSizeWidget {
} }
@override @override
Size get preferredSize => Size.fromHeight(kToolbarHeight);
Size get preferredSize => const Size.fromHeight(kToolbarHeight);
} }

6
lib/core/widgets/app_bar/styles/app_bar_action.dart

@ -15,10 +15,10 @@ class AppBarAction extends StatelessWidget {
onTap: onTap, onTap: onTap,
width: MySpaces.s32, width: MySpaces.s32,
height: MySpaces.s32, height: MySpaces.s32,
padding: EdgeInsets.all(MySpaces.s6),
padding: const EdgeInsets.all(MySpaces.s6),
boxShape: BoxShape.circle, boxShape: BoxShape.circle,
borderColor: Color(0XFF6D2ADA),
gradient: LinearGradient(
borderColor: const Color(0XFF6D2ADA),
gradient: const LinearGradient(
begin: AlignmentDirectional.topStart, begin: AlignmentDirectional.topStart,
end: AlignmentDirectional.bottomEnd, end: AlignmentDirectional.bottomEnd,
colors: [Color(0XFF823FEB), Color(0XFF4F09BF)], colors: [Color(0XFF823FEB), Color(0XFF4F09BF)],

10
lib/core/widgets/app_bar/styles/app_bar_add_widget.dart

@ -27,13 +27,13 @@ class AppBarAddWidget extends StatelessWidget {
onTap: onTap, onTap: onTap,
width: 96, width: 96,
height: 32, height: 32,
borderRadius: BorderRadius.all(Radius.circular(50)),
borderRadius: const BorderRadius.all(Radius.circular(50)),
borderGradient: LinearGradient( borderGradient: LinearGradient(
begin: AlignmentDirectional.topStart, begin: AlignmentDirectional.topStart,
end: AlignmentDirectional.bottomEnd, end: AlignmentDirectional.bottomEnd,
colors: gradientColors ?? [], colors: gradientColors ?? [],
), ),
padding: EdgeInsetsDirectional.only(
padding: const EdgeInsetsDirectional.only(
start: MySpaces.s8, start: MySpaces.s8,
end: MySpaces.s4, end: MySpaces.s4,
), ),
@ -54,10 +54,10 @@ class AppBarAddWidget extends StatelessWidget {
onTap: onTap, onTap: onTap,
width: 23, width: 23,
height: 23, height: 23,
padding: EdgeInsets.all(5),
color: Color(0XFF4F09BF),
padding: const EdgeInsets.all(5),
color: const Color(0XFF4F09BF),
boxShape: BoxShape.circle, boxShape: BoxShape.circle,
child: MyImage(asset: MyAssets.iconPlus),
child: const MyImage(asset: MyAssets.iconPlus),
), ),
], ],
), ),

2
lib/core/widgets/background/my_background.dart

@ -18,7 +18,7 @@ class MyBackground extends StatelessWidget {
), ),
), ),
child: listChild ?? SingleChildScrollView( child: listChild ?? SingleChildScrollView(
padding: EdgeInsets.symmetric(horizontal: MySpaces.s30),
padding: const EdgeInsets.symmetric(horizontal: MySpaces.s30),
child: child, child: child,
), ),
); );

4
lib/core/widgets/bottom_nav_bar/bottom_nav_bar.dart

@ -14,10 +14,10 @@ class BottomNavBar extends GetView<MasterController> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
clipBehavior: Clip.none, clipBehavior: Clip.none,
padding: EdgeInsets.symmetric(
padding: const EdgeInsets.symmetric(
horizontal: MySpaces.s30 horizontal: MySpaces.s30
), ),
decoration: BoxDecoration(
decoration: const BoxDecoration(
gradient: RadialGradient( gradient: RadialGradient(
radius: 2.5, radius: 2.5,
colors: [Color(0XFF4F09BF), Color(0XFF250459)], colors: [Color(0XFF4F09BF), Color(0XFF250459)],

4
lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_profile_item.dart

@ -17,12 +17,12 @@ class BottomNavBarProfileItem extends StatelessWidget {
Container( Container(
height: 26, height: 26,
width: 26, width: 26,
padding: EdgeInsets.all(3),
padding: const EdgeInsets.all(3),
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
border: Border.all( border: Border.all(
width: 1, width: 1,
color: Color(0XFFF4EEFF),
color: const Color(0XFFF4EEFF),
) )
), ),
child: MyImage(asset: bottomNavEntity.icon ?? ''), child: MyImage(asset: bottomNavEntity.icon ?? ''),

18
lib/core/widgets/button/styles/active_style.dart

@ -24,32 +24,32 @@ class ActiveStyle extends StatelessWidget {
height: 32, height: 32,
width: 116, width: 116,
onTap: onTap, onTap: onTap,
borderRadius: BorderRadius.all(Radius.circular(5)),
borderRadius: const BorderRadius.all(Radius.circular(5)),
borderGradient: LinearGradient( borderGradient: LinearGradient(
begin: AlignmentDirectional.centerStart, begin: AlignmentDirectional.centerStart,
end: AlignmentDirectional.centerEnd, end: AlignmentDirectional.centerEnd,
colors: [ 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( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
GradientText( GradientText(
text: title, text: title,
gradientColor: [ 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, fontSize: fontSize ?? 12,
), ),
if (icon != null) ...{ if (icon != null) ...{
MySpaces.s6.gapWidth, MySpaces.s6.gapWidth,
icon ?? SizedBox.shrink(),
icon ?? const SizedBox.shrink(),
}, },
], ],
), ),

14
lib/core/widgets/button/styles/default_style.dart

@ -24,9 +24,9 @@ class DefaultStyle extends StatelessWidget {
height: 32, height: 32,
width: 116, width: 116,
onTap: onTap, 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, begin: AlignmentDirectional.topStart,
end: AlignmentDirectional.bottomEnd, end: AlignmentDirectional.bottomEnd,
colors: [Color(0XFF823FEB), Color(0XFF4F09BF)], colors: [Color(0XFF823FEB), Color(0XFF4F09BF)],
@ -36,14 +36,14 @@ class DefaultStyle extends StatelessWidget {
children: [ children: [
GradientText( GradientText(
text: title, 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, fontSize: fontSize ?? 12,
), ),
if (icon != null) ...{ if (icon != null) ...{
MySpaces.s6.gapWidth, MySpaces.s6.gapWidth,
icon ?? SizedBox.shrink(),
icon ?? const SizedBox.shrink(),
}, },
], ],
), ),

6
lib/core/widgets/container/my_container.dart

@ -40,7 +40,7 @@ class MyContainer extends StatelessWidget {
return Material( return Material(
color: context.noColor, color: context.noColor,
borderRadius: boxShape == BoxShape.circle borderRadius: boxShape == BoxShape.circle
? BorderRadius.all(Radius.circular(100))
? const BorderRadius.all(Radius.circular(100))
: borderRadius, : borderRadius,
shadowColor: boxShadow?.first.color, shadowColor: boxShadow?.first.color,
elevation: boxShadow?.first.blurRadius ?? 0, elevation: boxShadow?.first.blurRadius ?? 0,
@ -48,11 +48,11 @@ class MyContainer extends StatelessWidget {
onTap: onTap, onTap: onTap,
customBorder: RoundedRectangleBorder( customBorder: RoundedRectangleBorder(
borderRadius: boxShape == BoxShape.circle borderRadius: boxShape == BoxShape.circle
? BorderRadius.all(Radius.circular(100))
? const BorderRadius.all(Radius.circular(100))
: borderRadius ?? BorderRadius.zero, : borderRadius ?? BorderRadius.zero,
), ),
child: Ink( child: Ink(
padding: EdgeInsets.all(1),
padding: const EdgeInsets.all(1),
width: width, width: width,
height: height, height: height,
decoration: BoxDecoration( decoration: BoxDecoration(

8
lib/core/widgets/input/my_input.dart

@ -66,16 +66,16 @@ class MyInput extends StatelessWidget {
style: Lexend.extraBold.copyWith(fontSize: 12), style: Lexend.extraBold.copyWith(fontSize: 12),
cursorColor: context.primaryColor, cursorColor: context.primaryColor,
decoration: InputDecoration( decoration: InputDecoration(
contentPadding: EdgeInsets.all(MySpaces.s14),
enabledBorder: OutlineInputBorder(
contentPadding: const EdgeInsets.all(MySpaces.s14),
enabledBorder: const OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(12)), borderRadius: BorderRadius.all(Radius.circular(12)),
borderSide: BorderSide(color: Color(0XFF5715BF), width: 1), borderSide: BorderSide(color: Color(0XFF5715BF), width: 1),
), ),
focusedBorder: OutlineInputBorder(
focusedBorder: const OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(12)), borderRadius: BorderRadius.all(Radius.circular(12)),
borderSide: BorderSide(color: Color(0XFF5715BF), width: 1), borderSide: BorderSide(color: Color(0XFF5715BF), width: 1),
), ),
fillColor: Color(0XFF000000).withValues(alpha: 0.2),
fillColor: const Color(0XFF000000).withValues(alpha: 0.2),
filled: true, filled: true,
hintText: hintText, hintText: hintText,
hintStyle: Lexend.extraBold.copyWith(fontSize: 12), hintStyle: Lexend.extraBold.copyWith(fontSize: 12),

8
lib/features/home/presentation/pages/home_page.dart

@ -22,14 +22,14 @@ class HomePage extends GetView<HomeController> {
child: Column( child: Column(
children: [ children: [
MySpaces.s28.gapHeight, MySpaces.s28.gapHeight,
MyImage(asset: MyAssets.shiaMindGroup),
const MyImage(asset: MyAssets.shiaMindGroup),
MySpaces.s40.gapHeight, MySpaces.s40.gapHeight,
HomeMembership(),
HomeBattleLeague(),
const HomeMembership(),
const HomeBattleLeague(),
MySpaces.s20.gapHeight, MySpaces.s20.gapHeight,
_customWidgets(context), _customWidgets(context),
MySpaces.s20.gapHeight, MySpaces.s20.gapHeight,
HomeBattleCast(),
const HomeBattleCast(),
], ],
), ),
); );

32
lib/features/home/presentation/pages/widgets/enums/custom_widget_type.dart

@ -9,12 +9,12 @@ enum CustomWidgetType {
friendBattle; friendBattle;
static Map<CustomWidgetType, Gradient> get borderGradient => { static Map<CustomWidgetType, Gradient> get borderGradient => {
CustomWidgetType.customLeague: LinearGradient(
CustomWidgetType.customLeague: const LinearGradient(
begin: AlignmentDirectional.topCenter, begin: AlignmentDirectional.topCenter,
end: AlignmentDirectional.bottomCenter, end: AlignmentDirectional.bottomCenter,
colors: [Color(0XFF4BAD42), Color(0XFF147743)], colors: [Color(0XFF4BAD42), Color(0XFF147743)],
), ),
CustomWidgetType.friendBattle: LinearGradient(
CustomWidgetType.friendBattle: const LinearGradient(
begin: AlignmentDirectional.topCenter, begin: AlignmentDirectional.topCenter,
end: AlignmentDirectional.bottomCenter, end: AlignmentDirectional.bottomCenter,
colors: [Color(0XFFED9851), Color(0XFFC77041)], colors: [Color(0XFFED9851), Color(0XFFC77041)],
@ -22,12 +22,12 @@ enum CustomWidgetType {
}; };
static Map<CustomWidgetType, Gradient> get gradient => { static Map<CustomWidgetType, Gradient> get gradient => {
CustomWidgetType.customLeague: RadialGradient(
CustomWidgetType.customLeague: const RadialGradient(
radius: 0.7, radius: 0.7,
center: Alignment(-0.6, -0.8), center: Alignment(-0.6, -0.8),
colors: [Color(0XFF58AE23), Color(0XFF066A36)], colors: [Color(0XFF58AE23), Color(0XFF066A36)],
), ),
CustomWidgetType.friendBattle: RadialGradient(
CustomWidgetType.friendBattle: const RadialGradient(
radius: 0.7, radius: 0.7,
center: Alignment(-0.6, -0.8), center: Alignment(-0.6, -0.8),
colors: [Color(0XFFE99E53), Color(0XFFBC673A)], colors: [Color(0XFFE99E53), Color(0XFFBC673A)],
@ -40,34 +40,34 @@ enum CustomWidgetType {
}; };
static Map<CustomWidgetType, Color> get containerColor => { static Map<CustomWidgetType, Color> get containerColor => {
CustomWidgetType.customLeague: Color(0XFF05542B),
CustomWidgetType.friendBattle: Color(0XFFA45A31),
CustomWidgetType.customLeague: const Color(0XFF05542B),
CustomWidgetType.friendBattle: const Color(0XFFA45A31),
}; };
static Map<CustomWidgetType, Color> get firstTextColor => { static Map<CustomWidgetType, Color> get firstTextColor => {
CustomWidgetType.customLeague: Color(0XFF4FDF94),
CustomWidgetType.friendBattle: Color(0XFFE3DFD5),
CustomWidgetType.customLeague: const Color(0XFF4FDF94),
CustomWidgetType.friendBattle: const Color(0XFFE3DFD5),
}; };
static Map<CustomWidgetType, Color> get secondTextColor => { static Map<CustomWidgetType, Color> get secondTextColor => {
CustomWidgetType.customLeague: Color(0XFF85C9A6),
CustomWidgetType.friendBattle: Color(0XFFDFBC9D),
CustomWidgetType.customLeague: const Color(0XFF85C9A6),
CustomWidgetType.friendBattle: const Color(0XFFDFBC9D),
}; };
static Map<CustomWidgetType, Widget> get title => { static Map<CustomWidgetType, Widget> get title => {
CustomWidgetType.customLeague: GradientText( CustomWidgetType.customLeague: GradientText(
text: Get.context?.translate.custom_league, text: Get.context?.translate.custom_league,
color: Color(0XFFBEF8DA),
shadowColor: Color(0xFF07592F),
color: const Color(0XFFBEF8DA),
shadowColor: const Color(0xFF07592F),
blurRadius: 0.52, blurRadius: 0.52,
offset: Offset(0, 1.04),
offset: const Offset(0, 1.04),
), ),
CustomWidgetType.friendBattle: GradientText( CustomWidgetType.friendBattle: GradientText(
text: Get.context?.translate.friends_battle, text: Get.context?.translate.friends_battle,
color: Color(0XFFFFB994),
shadowColor: Color(0xFFAA5B31),
color: const Color(0XFFFFB994),
shadowColor: const Color(0xFFAA5B31),
blurRadius: 0.52, blurRadius: 0.52,
offset: Offset(0, 1.04),
offset: const Offset(0, 1.04),
), ),
}; };
} }

38
lib/features/home/presentation/pages/widgets/home_battle_cast.dart

@ -22,20 +22,20 @@ class HomeBattleCast extends StatelessWidget {
children: [ children: [
MyContainer( MyContainer(
height: 120, 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, begin: AlignmentDirectional.topCenter,
end: AlignmentDirectional.bottomCenter, end: AlignmentDirectional.bottomCenter,
colors: [Color(0XFF567EFF), Color(0XFF304DB8)], colors: [Color(0XFF567EFF), Color(0XFF304DB8)],
), ),
gradient: RadialGradient( gradient: RadialGradient(
radius: 1, 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: DecorationImage(
image: AssetImage(MyAssets.addBackground),
image: const AssetImage(MyAssets.addBackground),
repeat: ImageRepeat.repeat, repeat: ImageRepeat.repeat,
colorFilter: ColorFilter.mode( colorFilter: ColorFilter.mode(
Colors.black.withValues(alpha: 0.02), Colors.black.withValues(alpha: 0.02),
@ -48,23 +48,23 @@ class HomeBattleCast extends StatelessWidget {
children: [ children: [
GradientText( GradientText(
text: context.translate.battle_cast, 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, blurRadius: 0.52,
shadowColor: Color(0xFF3C38C4),
shadowColor: const Color(0xFF3C38C4),
fontSize: 22, fontSize: 22,
), ),
MySpaces.s10.gapHeight, MySpaces.s10.gapHeight,
Container( Container(
padding: EdgeInsets.all(5),
padding: const EdgeInsets.all(5),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(8)),
color: Color(0XFF203689),
borderRadius: const BorderRadius.all(Radius.circular(8)),
color: const Color(0XFF203689),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Color(0XFF000000).withValues(alpha: 0.3),
color: const Color(0XFF000000).withValues(alpha: 0.3),
blurRadius: 3, blurRadius: 3,
offset: Offset(0, 2),
offset: const Offset(0, 2),
inset: true, inset: true,
), ),
], ],
@ -74,7 +74,7 @@ class HomeBattleCast extends StatelessWidget {
maxLines: 1, maxLines: 1,
style: Lexend.semiBold.copyWith( style: Lexend.semiBold.copyWith(
fontSize: 8, fontSize: 8,
color: Color(0XFFB6B3FF),
color: const Color(0XFFB6B3FF),
), ),
), ),
), ),
@ -85,12 +85,12 @@ class HomeBattleCast extends StatelessWidget {
start: -1, start: -1,
top: -MySpaces.s4, top: -MySpaces.s4,
child: MyContainer( child: MyContainer(
color: Color(0XFFCC9B22),
padding: EdgeInsets.symmetric(
color: const Color(0XFFCC9B22),
padding: const EdgeInsets.symmetric(
vertical: MySpaces.s2, vertical: MySpaces.s2,
horizontal: MySpaces.s8, horizontal: MySpaces.s8,
), ),
borderRadius: BorderRadiusDirectional.only(
borderRadius: const BorderRadiusDirectional.only(
topStart: Radius.circular(6), topStart: Radius.circular(6),
topEnd: Radius.circular(6), topEnd: Radius.circular(6),
bottomStart: Radius.circular(0), bottomStart: Radius.circular(0),
@ -104,7 +104,7 @@ class HomeBattleCast extends StatelessWidget {
), ),
), ),
), ),
PositionedDirectional(
const PositionedDirectional(
end: MySpaces.s20, end: MySpaces.s20,
top: -MySpaces.s10, top: -MySpaces.s10,
child: Row( child: Row(

18
lib/features/home/presentation/pages/widgets/home_battle_league.dart

@ -20,21 +20,21 @@ class HomeBattleLeague extends StatelessWidget {
MyContainer( MyContainer(
width: context.widthScreen, width: context.widthScreen,
height: 120, height: 120,
padding: EdgeInsets.symmetric(
padding: const EdgeInsets.symmetric(
horizontal: MySpaces.s12, horizontal: MySpaces.s12,
vertical: MySpaces.s16, vertical: MySpaces.s16,
), ),
borderGradient: LinearGradient(
borderGradient: const LinearGradient(
begin: AlignmentDirectional.centerStart, begin: AlignmentDirectional.centerStart,
end: AlignmentDirectional.centerEnd, end: AlignmentDirectional.centerEnd,
colors: [Color(0XFF3A0A85), Color(0XFF6C2ECD)], colors: [Color(0XFF3A0A85), Color(0XFF6C2ECD)],
), ),
gradient: LinearGradient(
gradient: const LinearGradient(
begin: AlignmentDirectional.centerStart, begin: AlignmentDirectional.centerStart,
end: AlignmentDirectional.centerEnd, end: AlignmentDirectional.centerEnd,
colors: [Color(0XFF3A0D83), Color(0XFF4F09BF)], colors: [Color(0XFF3A0D83), Color(0XFF4F09BF)],
), ),
borderRadius: BorderRadius.all(Radius.circular(20)),
borderRadius: const BorderRadius.all(Radius.circular(20)),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -42,23 +42,23 @@ class HomeBattleLeague extends StatelessWidget {
context.widthScreen.gapWidth, context.widthScreen.gapWidth,
GradientText( GradientText(
text: context.translate.battle_league, text: context.translate.battle_league,
color: Color(0XFFCAA8FF),
shadowColor: Color(0xFF3E1381),
color: const Color(0XFFCAA8FF),
shadowColor: const Color(0xFF3E1381),
blurRadius: 0.84, blurRadius: 0.84,
offset: Offset(0, 1.69),
offset: const Offset(0, 1.69),
fontSize: 22, fontSize: 22,
), ),
Text( Text(
context.translate.answer_win, context.translate.answer_win,
style: Lexend.medium.copyWith( style: Lexend.medium.copyWith(
fontSize: 10, fontSize: 10,
color: Color(0XFFA183D2),
color: const Color(0XFFA183D2),
), ),
), ),
], ],
), ),
), ),
MyImage(asset: MyAssets.cup),
const MyImage(asset: MyAssets.cup),
], ],
); );
} }

18
lib/features/home/presentation/pages/widgets/home_custom_widget.dart

@ -25,18 +25,18 @@ class HomeCustomWidget extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MyContainer( return MyContainer(
height: 130, height: 130,
borderRadius: BorderRadius.all(Radius.circular(20)),
borderRadius: const BorderRadius.all(Radius.circular(20)),
borderGradient: CustomWidgetType.borderGradient[type], borderGradient: CustomWidgetType.borderGradient[type],
gradient: CustomWidgetType.gradient[type], gradient: CustomWidgetType.gradient[type],
image: DecorationImage( image: DecorationImage(
image: AssetImage(MyAssets.addBackground),
image: const AssetImage(MyAssets.addBackground),
repeat: ImageRepeat.repeat, repeat: ImageRepeat.repeat,
colorFilter: ColorFilter.mode( colorFilter: ColorFilter.mode(
Colors.black.withValues(alpha: 0.02), Colors.black.withValues(alpha: 0.02),
BlendMode.srcIn, BlendMode.srcIn,
), ),
), ),
padding: EdgeInsets.all(MySpaces.s10),
padding: const EdgeInsets.all(MySpaces.s10),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -44,20 +44,20 @@ class HomeCustomWidget extends StatelessWidget {
alignment: AlignmentDirectional.centerEnd, alignment: AlignmentDirectional.centerEnd,
child: MyImage(asset: CustomWidgetType.image[type] ?? '',), child: MyImage(asset: CustomWidgetType.image[type] ?? '',),
), ),
Spacer(),
CustomWidgetType.title[type] ?? SizedBox.shrink(),
const Spacer(),
CustomWidgetType.title[type] ?? const SizedBox.shrink(),
MySpaces.s10.gapHeight, MySpaces.s10.gapHeight,
Container( Container(
padding: EdgeInsets.all(5),
padding: const EdgeInsets.all(5),
width: context.widthScreen, width: context.widthScreen,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(8)),
borderRadius: const BorderRadius.all(Radius.circular(8)),
color: CustomWidgetType.containerColor[type], color: CustomWidgetType.containerColor[type],
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Color(0XFF000000).withValues(alpha: 0.3),
color: const Color(0XFF000000).withValues(alpha: 0.3),
blurRadius: 3, blurRadius: 3,
offset: Offset(0, 2),
offset: const Offset(0, 2),
inset: true, inset: true,
), ),
], ],

18
lib/features/home/presentation/pages/widgets/home_membership.dart

@ -22,33 +22,33 @@ class HomeMembership extends StatelessWidget {
begin: AlignmentDirectional.topStart, begin: AlignmentDirectional.topStart,
end: AlignmentDirectional.bottomEnd, end: AlignmentDirectional.bottomEnd,
colors: [ 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: [
BoxShadow(
const BoxShadow(
color: MyColors.black, color: MyColors.black,
blurRadius: 17, blurRadius: 17,
offset: Offset(0, 4), offset: Offset(0, 4),
spreadRadius: 20, spreadRadius: 20,
), ),
], ],
padding: EdgeInsets.symmetric(horizontal: MySpaces.s16, vertical: 13),
padding: const EdgeInsets.symmetric(horizontal: MySpaces.s16, vertical: 13),
child: Row( child: Row(
children: [ children: [
MyImage(asset: MyAssets.iconCrown),
const MyImage(asset: MyAssets.iconCrown),
MySpaces.s8.gapWidth, MySpaces.s8.gapWidth,
Text( Text(
context.translate.pro_membership, context.translate.pro_membership,
style: Lexend.semiBold.copyWith( style: Lexend.semiBold.copyWith(
fontSize: 12, fontSize: 12,
color: Color(0XFFFCC230),
color: const Color(0XFFFCC230),
), ),
), ),
Spacer(),
MyImage(asset: MyAssets.iconClock),
const Spacer(),
const MyImage(asset: MyAssets.iconClock),
MySpaces.s6.gapWidth, MySpaces.s6.gapWidth,
Text('125d 4h', style: Lexend.semiBold.copyWith(fontSize: 12)), Text('125d 4h', style: Lexend.semiBold.copyWith(fontSize: 12)),
], ],

4
lib/features/intro/presentation/ui/intro_page.dart

@ -40,7 +40,7 @@ class IntroPage extends GetView<IntroController> {
} }
Stack _logo(BuildContext context) { Stack _logo(BuildContext context) {
return Stack(
return const Stack(
clipBehavior: Clip.none, clipBehavior: Clip.none,
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
@ -113,7 +113,7 @@ class IntroPage extends GetView<IntroController> {
context.translate.loading, context.translate.loading,
style: Lexend.regular.copyWith(fontSize: MySpaces.s14), style: Lexend.regular.copyWith(fontSize: MySpaces.s14),
), ),
IntroLoading(),
const IntroLoading(),
], ],
), ),
); );

6
lib/features/intro/presentation/ui/widgets/intro_loading.dart

@ -11,13 +11,13 @@ class IntroLoading extends StatelessWidget {
return Container( return Container(
width: 188, width: 188,
height: MySpaces.s16, height: MySpaces.s16,
padding: EdgeInsetsDirectional.only(
padding: const EdgeInsetsDirectional.only(
start: MySpaces.s2, start: MySpaces.s2,
top: MySpaces.s2, top: MySpaces.s2,
bottom: MySpaces.s2, bottom: MySpaces.s2,
end: MySpaces.s20, end: MySpaces.s20,
), ),
decoration: ShapeDecoration(
decoration: const ShapeDecoration(
shape: StadiumBorder( shape: StadiumBorder(
side: BorderSide( side: BorderSide(
width: 1, width: 1,
@ -34,7 +34,7 @@ class IntroLoading extends StatelessWidget {
color: Colors.white.withValues(alpha: 0.5), color: Colors.white.withValues(alpha: 0.5),
), ),
), ),
gradient: LinearGradient(
gradient: const LinearGradient(
begin: AlignmentDirectional.centerStart, begin: AlignmentDirectional.centerStart,
end: AlignmentDirectional.centerEnd, end: AlignmentDirectional.centerEnd,
colors: [ colors: [

4
lib/features/master/presentation/ui/master_page.dart

@ -12,8 +12,8 @@ class MasterPage extends GetView<MasterController> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
appBar: MasterAppBar(),
bottomNavigationBar: BottomNavBar(),
appBar: const MasterAppBar(),
bottomNavigationBar: const BottomNavBar(),
body: GetRouterOutlet( body: GetRouterOutlet(
initialRoute: Routes.homePage, initialRoute: Routes.homePage,
anchorRoute: Routes.masterPage, anchorRoute: Routes.masterPage,

6
lib/features/profile/presentation/ui/profile_page.dart

@ -21,7 +21,7 @@ class ProfilePage extends GetView<ProfileController> {
child: Column( child: Column(
children: [ children: [
60.0.gapHeight, 60.0.gapHeight,
ProfileAvatar(),
const ProfileAvatar(),
_changeProfileBtn(context), _changeProfileBtn(context),
MySpaces.s40.gapHeight, MySpaces.s40.gapHeight,
_userNameInput(context), _userNameInput(context),
@ -59,13 +59,13 @@ class ProfilePage extends GetView<ProfileController> {
hintText: 'Iran - Tehran', hintText: 'Iran - Tehran',
), ),
), ),
ProfileLocation(),
const ProfileLocation(),
], ],
); );
} }
Row _bottomButtons() { Row _bottomButtons() {
return Row(
return const Row(
spacing: MySpaces.s20, spacing: MySpaces.s20,
children: [ children: [
Expanded(child: ProfileDeleteAccount()), Expanded(child: ProfileDeleteAccount()),

2
lib/features/profile/presentation/ui/widgets/profile_avatar.dart

@ -15,7 +15,7 @@ class ProfileAvatar extends StatelessWidget {
shape: BoxShape.circle, shape: BoxShape.circle,
border: Border.all(width: 2.5, color: context.primaryColor), border: Border.all(width: 2.5, color: context.primaryColor),
), ),
child: MyImage(asset: MyAssets.sampleAvatar),
child: const MyImage(asset: MyAssets.sampleAvatar),
); );
} }
} }

10
lib/features/profile/presentation/ui/widgets/profile_delete_account.dart

@ -13,17 +13,17 @@ class ProfileDeleteAccount extends StatelessWidget {
return MyContainer( return MyContainer(
height: 58, height: 58,
onTap: () {}, onTap: () {},
borderRadius: BorderRadius.all(Radius.circular(MySpaces.s12)),
borderRadius: const BorderRadius.all(Radius.circular(MySpaces.s12)),
color: context.backgroundColor, color: context.backgroundColor,
borderGradient: LinearGradient( borderGradient: LinearGradient(
begin: AlignmentDirectional.centerStart, begin: AlignmentDirectional.centerStart,
end: AlignmentDirectional.centerEnd, end: AlignmentDirectional.centerEnd,
colors: [ 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, vertical: MySpaces.s16,
horizontal: MySpaces.s28, horizontal: MySpaces.s28,
), ),
@ -31,7 +31,7 @@ class ProfileDeleteAccount extends StatelessWidget {
child: Text( child: Text(
context.translate.delete_account, context.translate.delete_account,
maxLines: 1, maxLines: 1,
style: Lexend.semiBold.copyWith(fontSize: 14, color: Color(0XFF5F5F88)),
style: Lexend.semiBold.copyWith(fontSize: 14, color: const Color(0XFF5F5F88)),
), ),
), ),
); );

6
lib/features/profile/presentation/ui/widgets/profile_location.dart

@ -12,9 +12,9 @@ class ProfileLocation extends StatelessWidget {
onTap: () {}, onTap: () {},
width: 48, width: 48,
height: 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),
); );
} }
} }

8
lib/features/profile/presentation/ui/widgets/profile_logout.dart

@ -14,9 +14,9 @@ class ProfileLogout extends StatelessWidget {
return MyContainer( return MyContainer(
height: 58, height: 58,
onTap: () {}, 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, vertical: MySpaces.s16,
horizontal: MySpaces.s28, horizontal: MySpaces.s28,
), ),
@ -24,7 +24,7 @@ class ProfileLogout extends StatelessWidget {
spacing: MySpaces.s10, spacing: MySpaces.s10,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
MyImage(asset: MyAssets.iconLogout),
const MyImage(asset: MyAssets.iconLogout),
FittedBox( FittedBox(
child: Text( child: Text(
context.translate.logout, context.translate.logout,

2
lib/features/shop/data/model/shop_model.dart

@ -4,6 +4,6 @@ class ShopModel extends ShopEntity {
const ShopModel(); const ShopModel();
factory ShopModel.fromJson(Map<String, dynamic> json) { factory ShopModel.fromJson(Map<String, dynamic> json) {
return ShopModel();
return const ShopModel();
} }
} }

10
lib/features/shop/presentation/controller/shop_controller.dart

@ -33,7 +33,7 @@ class ShopController extends GetxController with StateMixin {
/// ----- Variables ----- /// ----- Variables -----
final Rx<ShopParams> shopParams = Rx(ShopParams()); final Rx<ShopParams> shopParams = Rx(ShopParams());
final RxList<ShopPackageEntity> shopList = RxList([ final RxList<ShopPackageEntity> shopList = RxList([
ShopPackageEntity(
const ShopPackageEntity(
title: 'Gem Package', title: 'Gem Package',
shopList: [ shopList: [
GemEntity(number: 30, image: MyAssets.gem1, price: 12), 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), GemEntity(number: 270, image: MyAssets.gem4, price: 96),
], ],
), ),
ShopPackageEntity(
const ShopPackageEntity(
title: 'Boost Package', title: 'Boost Package',
shopList: [ shopList: [
BoostEntity(number: 10, image: MyAssets.boost1, price: 10), 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), BoostEntity(number: 40, image: MyAssets.boost4, price: 40),
], ],
), ),
ShopPackageEntity(
const ShopPackageEntity(
title: 'Character Package', title: 'Character Package',
shopList: [ shopList: [
CharacterEntity(image: MyAssets.character1, price: 12, isActive: true, isBuy: true), 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), CharacterEntity(image: MyAssets.character1, price: 12, isActive: false, isBuy: false),
], ],
), ),
ShopPackageEntity(
const ShopPackageEntity(
title: 'Books', title: 'Books',
shopList: [ shopList: [
BookEntity(image: MyAssets.book1, title: 'Super Stories of the Prophets'), 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'), BookEntity(image: MyAssets.book3, title: 'Super Stories of the Prophets'),
], ],
), ),
ShopPackageEntity(
const ShopPackageEntity(
title: 'Pro Membership', title: 'Pro Membership',
shopList: [ shopList: [
ProMembershipEntity(image: MyAssets.member1, price: 2.5, number: 1), ProMembershipEntity(image: MyAssets.member1, price: 2.5, number: 1),

2
lib/features/shop/presentation/ui/shop_page.dart

@ -15,7 +15,7 @@ class ShopPage extends GetView<ShopController> {
listChild: Obx( listChild: Obx(
() => ListView.separated( () => ListView.separated(
itemCount: controller.shopList.length, itemCount: controller.shopList.length,
padding: EdgeInsets.only(
padding: const EdgeInsets.only(
left: MySpaces.s30, left: MySpaces.s30,
right: MySpaces.s30, right: MySpaces.s30,
bottom: MySpaces.s30, bottom: MySpaces.s30,

14
lib/features/shop/presentation/ui/widgets/shop_item/shop_item_widget.dart

@ -19,14 +19,14 @@ class ShopItemWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MyContainer( 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( 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) { child: switch(shop.type) {
ShopType.gem => GemStyle(shop: shop), ShopType.gem => GemStyle(shop: shop),
ShopType.boost => BoostStyle(shop: shop), ShopType.boost => BoostStyle(shop: shop),

4
lib/features/shop/presentation/ui/widgets/shop_item/styles/book_style.dart

@ -23,10 +23,10 @@ class BookStyle extends StatelessWidget {
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all(width: 2, color: context.primaryColor), border: Border.all(width: 2, color: context.primaryColor),
borderRadius: BorderRadius.all(Radius.circular(8)),
borderRadius: const BorderRadius.all(Radius.circular(8)),
), ),
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(6)),
borderRadius: const BorderRadius.all(Radius.circular(6)),
child: MyImage( child: MyImage(
asset: shop.image ?? '', asset: shop.image ?? '',
size: 110, size: 110,

8
lib/features/shop/presentation/ui/widgets/shop_item/styles/boost_style.dart

@ -20,9 +20,9 @@ class BoostStyle extends StatelessWidget {
GradientText( GradientText(
text: '${shop.number} ${shop.title}', text: '${shop.number} ${shop.title}',
fontSize: 18, 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( Expanded(
child: MyImage( child: MyImage(
@ -35,7 +35,7 @@ class BoostStyle extends StatelessWidget {
onTap: () {}, onTap: () {},
title: '${shop.price?.priceFormat}', title: '${shop.price?.priceFormat}',
fontSize: 20, fontSize: 20,
icon: MyImage(asset: MyAssets.gem),
icon: const MyImage(asset: MyAssets.gem),
), ),
], ],
), ),

22
lib/features/shop/presentation/ui/widgets/shop_item/styles/character_style.dart

@ -24,13 +24,13 @@ class CharacterStyle extends StatelessWidget {
Expanded( Expanded(
child: AnimatedContainer( child: AnimatedContainer(
width: 118, width: 118,
duration: Duration(milliseconds: 200),
duration: const Duration(milliseconds: 200),
decoration: BoxDecoration( 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: shop.isActive == true
? [ ? [
BoxShadow(
const BoxShadow(
color: Color(0xFFB37EFA), color: Color(0xFFB37EFA),
spreadRadius: 0, spreadRadius: 0,
blurRadius: 22, blurRadius: 22,
@ -40,7 +40,7 @@ class CharacterStyle extends StatelessWidget {
: null, : null,
), ),
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(6)),
borderRadius: const BorderRadius.all(Radius.circular(6)),
child: Stack( child: Stack(
alignment: AlignmentDirectional.bottomEnd, alignment: AlignmentDirectional.bottomEnd,
children: [ children: [
@ -56,13 +56,13 @@ class CharacterStyle extends StatelessWidget {
height: 42, height: 42,
width: 42, width: 42,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(
borderRadius: const BorderRadius.all(
Radius.circular(5), Radius.circular(5),
), ),
color: MyColors.black.withValues(alpha: 0.8), color: MyColors.black.withValues(alpha: 0.8),
), ),
), ),
PositionedDirectional(
const PositionedDirectional(
top: -0, top: -0,
end: -5, end: -5,
child: MyImage(asset: MyAssets.done), child: MyImage(asset: MyAssets.done),
@ -77,14 +77,14 @@ class CharacterStyle extends StatelessWidget {
child: Container( child: Container(
height: 42, height: 42,
width: 42, width: 42,
padding: EdgeInsets.all(MySpaces.s10),
padding: const EdgeInsets.all(MySpaces.s10),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(
borderRadius: const BorderRadius.all(
Radius.circular(5), Radius.circular(5),
), ),
color: MyColors.black.withValues(alpha: 0.8), color: MyColors.black.withValues(alpha: 0.8),
), ),
child: MyImage(
child: const MyImage(
asset: MyAssets.lock, asset: MyAssets.lock,
), ),
), ),
@ -101,7 +101,7 @@ class CharacterStyle extends StatelessWidget {
: shop.isBuy == true : shop.isBuy == true
? context.translate.select ? context.translate.select
: '${shop.price?.priceFormat}', : '${shop.price?.priceFormat}',
icon: shop.isBuy == true ? null : MyImage(asset: MyAssets.gem),
icon: shop.isBuy == true ? null : const MyImage(asset: MyAssets.gem),
fontSize: 20, fontSize: 20,
type: shop.isActive == true type: shop.isActive == true
? MyButtonType.activeType ? MyButtonType.activeType

6
lib/features/shop/presentation/ui/widgets/shop_item/styles/gem_style.dart

@ -19,9 +19,9 @@ class GemStyle extends StatelessWidget {
GradientText( GradientText(
text: '${shop.number} ${shop.title}', text: '${shop.number} ${shop.title}',
fontSize: 18, 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( Expanded(
child: MyImage( child: MyImage(

6
lib/features/shop/presentation/ui/widgets/shop_item/styles/pro_membership_style.dart

@ -20,9 +20,9 @@ class ProMembershipStyle extends StatelessWidget {
GradientText( GradientText(
text: '${shop.number} ${shop.title}', text: '${shop.number} ${shop.title}',
fontSize: 18, 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( MyImage(
asset: shop.image ?? '', asset: shop.image ?? '',

18
lib/features/shop/presentation/ui/widgets/shop_package_entity.dart

@ -19,8 +19,8 @@ class ShopPackageWidget extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MyContainer( return MyContainer(
width: context.widthScreen, width: context.widthScreen,
borderRadius: BorderRadius.all(Radius.circular(12)),
gradient: LinearGradient(
borderRadius: const BorderRadius.all(Radius.circular(12)),
gradient: const LinearGradient(
begin: Alignment.topCenter, begin: Alignment.topCenter,
end: Alignment.bottomCenter, end: Alignment.bottomCenter,
colors: [Color(0XFF411183), Color(0XFF2F0E5C)], colors: [Color(0XFF411183), Color(0XFF2F0E5C)],
@ -28,9 +28,9 @@ class ShopPackageWidget extends StatelessWidget {
borderGradient: LinearGradient( borderGradient: LinearGradient(
begin: Alignment.topCenter, begin: Alignment.topCenter,
end: Alignment.bottomCenter, 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( child: Column(
children: [ children: [
Stack( Stack(
@ -41,14 +41,14 @@ class ShopPackageWidget extends StatelessWidget {
child: GradientText( child: GradientText(
textAlign: TextAlign.center, textAlign: TextAlign.center,
text: shopPackage.title, 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, blurRadius: 0.84,
fontSize: 22, fontSize: 22,
), ),
), ),
PositionedDirectional(
const PositionedDirectional(
end: 0, end: 0,
child: MyImage(asset: MyAssets.iconInfo), child: MyImage(asset: MyAssets.iconInfo),
), ),
@ -66,7 +66,7 @@ class ShopPackageWidget extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
ShopItemWidget( ShopItemWidget(
shop: shopPackage.shopList?[index] ?? ShopEntity(),
shop: shopPackage.shopList?[index] ?? const ShopEntity(),
), ),
], ],
), ),

Loading…
Cancel
Save