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/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(), ), ], ),