diff --git a/lib/core/utils/screen_size.dart b/lib/core/utils/screen_size.dart index b0292ae..b4efd63 100644 --- a/lib/core/utils/screen_size.dart +++ b/lib/core/utils/screen_size.dart @@ -1,13 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:get/get.dart'; extension ScreenSize on BuildContext { double get widthScreen => MediaQuery.sizeOf(this).width; double get heightScreen => MediaQuery.sizeOf(this).height; } - -extension AdaptiveSize on int { - double get w => Get.context!.widthScreen * this / 375; - double get h => Get.context!.heightScreen * this / 812; - // double get sp => MediaQuery.textScalerOf(Get.context!).scale(toDouble()); -} diff --git a/lib/core/widgets/app_bar/my_app_bar.dart b/lib/core/widgets/app_bar/my_app_bar.dart index e47116b..16bc406 100644 --- a/lib/core/widgets/app_bar/my_app_bar.dart +++ b/lib/core/widgets/app_bar/my_app_bar.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/app_bar/enums/app_bar_type.dart'; class MyAppBar extends StatelessWidget implements PreferredSizeWidget { @@ -35,7 +34,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget { return AppBar( backgroundColor: backgroundColor, centerTitle: true, - titleSpacing: 30.w, + titleSpacing: 30, scrolledUnderElevation: 0, title: AppBarType.title( title: title, diff --git a/lib/core/widgets/app_bar/styles/master_app_bar.dart b/lib/core/widgets/app_bar/styles/master_app_bar.dart index 67d805d..be19fdc 100644 --- a/lib/core/widgets/app_bar/styles/master_app_bar.dart +++ b/lib/core/widgets/app_bar/styles/master_app_bar.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:shia_game_flutter/common_ui/resources/my_assets.dart'; import 'package:shia_game_flutter/core/utils/gap.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/app_bar/widgets/app_bar_action.dart'; import 'package:shia_game_flutter/core/widgets/app_bar/widgets/app_bar_add_widget.dart'; @@ -37,7 +36,7 @@ class MasterAppBar extends StatelessWidget implements PreferredSizeWidget { const Color(0XFF4F16A0), ], ), - 6.w.gapWidth, + 6.0.gapWidth, AppBarAddWidget( onTap: onFlashTap, icon: MyAssets.iconFlash, @@ -52,7 +51,7 @@ class MasterAppBar extends StatelessWidget implements PreferredSizeWidget { icon: MyAssets.iconShare, onTap: onShareTap, ), - 12.w.gapWidth, + 12.0.gapWidth, AppBarAction( icon: MyAssets.iconSetting, onTap: onSettingTap, diff --git a/lib/core/widgets/app_bar/widgets/app_bar_add_widget.dart b/lib/core/widgets/app_bar/widgets/app_bar_add_widget.dart index fc73ae8..86d5043 100644 --- a/lib/core/widgets/app_bar/widgets/app_bar_add_widget.dart +++ b/lib/core/widgets/app_bar/widgets/app_bar_add_widget.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:shia_game_flutter/common_ui/resources/my_assets.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/common_ui/theme/my_theme.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'; @@ -24,8 +23,8 @@ class AppBarAddWidget extends StatelessWidget { Widget build(BuildContext context) { return MyContainer( onTap: onTap, - width: 96.w, - height: 32.h, + width: 96, + height: 32, borderRadius: const BorderRadius.all(Radius.circular(50)), borderGradient: LinearGradient( begin: AlignmentDirectional.topStart, 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 8cdd675..984f451 100644 --- a/lib/core/widgets/bottom_nav_bar/bottom_nav_bar.dart +++ b/lib/core/widgets/bottom_nav_bar/bottom_nav_bar.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:get/get_state_manager/src/rx_flutter/rx_obx_widget.dart'; import 'package:get/get_state_manager/src/simple/get_view.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_item.dart'; import 'package:shia_game_flutter/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_profile_item.dart'; import 'package:shia_game_flutter/features/master/presentation/controller/master_controller.dart'; @@ -13,7 +12,7 @@ class BottomNavBar extends GetView { @override Widget build(BuildContext context) { return Container( - padding: EdgeInsets.symmetric(horizontal: 30.w), + padding: const EdgeInsets.symmetric(horizontal: 30), decoration: const BoxDecoration( gradient: RadialGradient( radius: 2.5, diff --git a/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_item.dart b/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_item.dart index a7c5a56..4a6c3fe 100644 --- a/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_item.dart +++ b/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_item.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; import 'package:shia_game_flutter/features/master/domain/entity/bottom_nav_entity.dart'; @@ -12,7 +11,7 @@ class BottomNavBarItem extends StatelessWidget { @override Widget build(BuildContext context) { return Column( - spacing: 4.h, + spacing: 4, children: [ MyImage(asset: bottomNavEntity.icon ?? ''), Text( 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 afd0586..ded65d8 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 @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; import 'package:shia_game_flutter/features/master/domain/entity/bottom_nav_entity.dart'; @@ -12,11 +11,11 @@ class BottomNavBarProfileItem extends StatelessWidget { @override Widget build(BuildContext context) { return Column( - spacing: 4.h, + spacing: 4, children: [ Container( - height: 26.h, - width: 26.w, + height: 26, + width: 26, padding: const EdgeInsets.all(3), decoration: BoxDecoration( shape: BoxShape.circle, diff --git a/lib/core/widgets/button/styles/active_style.dart b/lib/core/widgets/button/styles/active_style.dart index 8841ede..3e97da2 100644 --- a/lib/core/widgets/button/styles/active_style.dart +++ b/lib/core/widgets/button/styles/active_style.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:shia_game_flutter/core/utils/gap.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/container/my_container.dart'; import 'package:shia_game_flutter/core/widgets/text/gradient_text.dart'; @@ -21,8 +20,8 @@ class ActiveStyle extends StatelessWidget { @override Widget build(BuildContext context) { return MyContainer( - height: 32.h, - width: 116.w, + height: 32, + width: 116, onTap: onTap, borderRadius: const BorderRadius.all(Radius.circular(5)), borderGradient: LinearGradient( @@ -48,7 +47,7 @@ class ActiveStyle extends StatelessWidget { fontSize: fontSize ?? 12, ), if (icon != null) ...{ - 6.w.gapWidth, + 6.0.gapWidth, 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 bc1191b..1341826 100644 --- a/lib/core/widgets/button/styles/default_style.dart +++ b/lib/core/widgets/button/styles/default_style.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:shia_game_flutter/core/utils/gap.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/container/my_container.dart'; import 'package:shia_game_flutter/core/widgets/text/gradient_text.dart'; @@ -21,8 +20,8 @@ class DefaultStyle extends StatelessWidget { @override Widget build(BuildContext context) { return MyContainer( - height: 32.h, - width: 116.w, + height: 32, + width: 116, onTap: onTap, borderColor: const Color(0XFF6D2ADA), borderRadius: const BorderRadius.all(Radius.circular(5)), @@ -42,7 +41,7 @@ class DefaultStyle extends StatelessWidget { fontSize: fontSize ?? 12, ), if (icon != null) ...{ - 6.w.gapWidth, + 6.0.gapWidth, icon ?? const SizedBox.shrink(), }, ], diff --git a/lib/core/widgets/loading/my_linear_loading.dart b/lib/core/widgets/loading/my_linear_loading.dart index d0b7bac..0fe7323 100644 --- a/lib/core/widgets/loading/my_linear_loading.dart +++ b/lib/core/widgets/loading/my_linear_loading.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.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/screen_size.dart'; class MyLinearLoading extends StatelessWidget { const MyLinearLoading({ @@ -11,7 +10,7 @@ class MyLinearLoading extends StatelessWidget { @override Widget build(BuildContext context) { return Column( - spacing: 10.h, + spacing: 10, mainAxisSize: MainAxisSize.min, children: [ Text( @@ -19,8 +18,8 @@ class MyLinearLoading extends StatelessWidget { style: Lexend.regular.copyWith(fontSize: 12), ), Container( - width: 188.w, - height: 16.h, + width: 188, + height: 16, padding: const EdgeInsetsDirectional.only( start: 2, top: 2, @@ -36,7 +35,7 @@ class MyLinearLoading extends StatelessWidget { ), ), child: Container( - height: 14.h, + height: 14, decoration: ShapeDecoration( shape: StadiumBorder( side: BorderSide( diff --git a/lib/core/widgets/stepper/my_stepper.dart b/lib/core/widgets/stepper/my_stepper.dart index 7564628..621a24a 100644 --- a/lib/core/widgets/stepper/my_stepper.dart +++ b/lib/core/widgets/stepper/my_stepper.dart @@ -8,10 +8,10 @@ class MyStepper extends StatelessWidget { @override Widget build(BuildContext context) { return Container( - height: 30.h, + height: 30, width: context.widthScreen, alignment: Alignment.center, - padding: EdgeInsets.symmetric(horizontal: 16.w), + padding: const EdgeInsets.symmetric(horizontal: 16), decoration: const ShapeDecoration( shape: StadiumBorder(), color: Color(0XFF3A1570), @@ -20,7 +20,7 @@ class MyStepper extends StatelessWidget { alignment: Alignment.center, children: [ Container( - height: 3.h, + height: 3, width: context.widthScreen, decoration: const ShapeDecoration( shape: StadiumBorder(), diff --git a/lib/features/awards/presentation/ui/widgets/award_widget.dart b/lib/features/awards/presentation/ui/widgets/award_widget.dart index b90baaa..f019b09 100644 --- a/lib/features/awards/presentation/ui/widgets/award_widget.dart +++ b/lib/features/awards/presentation/ui/widgets/award_widget.dart @@ -80,7 +80,7 @@ class _AwardWidgetState extends State { spacing: 12, children: [ SizedBox( - height: 100.h, + height: 100, child: Stack( alignment: Alignment.center, children: [ diff --git a/lib/features/battle_league/presentation/controller/battle_league_controller.dart b/lib/features/battle_league/presentation/controller/battle_league_controller.dart index 7f51f30..cc70c1d 100644 --- a/lib/features/battle_league/presentation/controller/battle_league_controller.dart +++ b/lib/features/battle_league/presentation/controller/battle_league_controller.dart @@ -101,12 +101,10 @@ class BattleLeagueController extends GetxController } void goToFindingPage() { - print(AuthStorage.token); Get.toNamed(Routes.battleLeagueFindingPage); _webSocketService.connect(); _webSocketService.clientConnected.listen((event) { clientID = json.decode(utf8.decode(event.data))['player_id']; - print(clientID); getClock(); connectStatus.value = const BaseComplete(); }); @@ -167,10 +165,8 @@ class BattleLeagueController extends GetxController final String lockedBy = json.decode( utf8.decode(event.data))['locked_by']; if (lockedBy == enemyId) { - print('rich enemy'); enemyWonNumber.value = enemyWonNumber.value + 1; } else { - print('rich myself'); myWonNumber.value = myWonNumber.value + 1; } } diff --git a/lib/features/battle_league/presentation/ui/first_part/battle_league_finding_page.dart b/lib/features/battle_league/presentation/ui/first_part/battle_league_finding_page.dart index 4656880..74480a2 100644 --- a/lib/features/battle_league/presentation/ui/first_part/battle_league_finding_page.dart +++ b/lib/features/battle_league/presentation/ui/first_part/battle_league_finding_page.dart @@ -6,7 +6,6 @@ import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/core/status/base_status.dart'; import 'package:shia_game_flutter/core/utils/gap.dart'; import 'package:shia_game_flutter/core/utils/my_localization.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; import 'package:shia_game_flutter/features/battle_league/presentation/controller/battle_league_controller.dart'; import 'package:shia_game_flutter/features/battle_league/presentation/ui/first_part/widgets/button/battle_purple_button.dart'; @@ -24,13 +23,13 @@ class BattleLeagueFindingPage extends GetView { padding: const EdgeInsets.symmetric(horizontal: 30), child: Column( children: [ - 20.h.gapHeight, + 20.0.gapHeight, const RankTitle(), const Spacer(), _findingImage(context), const Spacer(), _description(context), - 37.h.gapHeight, + 37.0.gapHeight, _startFindingButton(context), ], ), diff --git a/lib/features/battle_league/presentation/ui/first_part/battle_league_founded_page.dart b/lib/features/battle_league/presentation/ui/first_part/battle_league_founded_page.dart index 817ff5f..8d2ea82 100644 --- a/lib/features/battle_league/presentation/ui/first_part/battle_league_founded_page.dart +++ b/lib/features/battle_league/presentation/ui/first_part/battle_league_founded_page.dart @@ -3,7 +3,6 @@ import 'package:get/get.dart'; import 'package:shia_game_flutter/common_ui/resources/my_assets.dart'; import 'package:shia_game_flutter/common_ui/resources/my_colors.dart'; import 'package:shia_game_flutter/core/utils/gap.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; import 'package:shia_game_flutter/core/widgets/loading/my_linear_loading.dart'; import 'package:shia_game_flutter/features/battle_league/presentation/controller/battle_league_controller.dart'; @@ -26,13 +25,13 @@ class BattleLeagueFoundedPage extends GetView { padding: const EdgeInsets.symmetric(horizontal: 30), child: Column( children: [ - 20.h.gapHeight, + 20.0.gapHeight, const RankTitle(), - 50.h.gapHeight, + 50.0.gapHeight, const FoundedAvatar(), _image(), const FoundedAvatar(), - 50.h.gapHeight, + 50.0.gapHeight, const MyLinearLoading(), ], ), diff --git a/lib/features/battle_league/presentation/ui/first_part/battle_league_page.dart b/lib/features/battle_league/presentation/ui/first_part/battle_league_page.dart index 5fe5198..106414f 100644 --- a/lib/features/battle_league/presentation/ui/first_part/battle_league_page.dart +++ b/lib/features/battle_league/presentation/ui/first_part/battle_league_page.dart @@ -3,7 +3,6 @@ import 'package:get/get.dart'; import 'package:shia_game_flutter/common_ui/theme/my_theme.dart'; import 'package:shia_game_flutter/core/utils/gap.dart'; import 'package:shia_game_flutter/core/utils/my_localization.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/app_bar/enums/app_bar_type.dart'; import 'package:shia_game_flutter/core/widgets/app_bar/my_app_bar.dart'; import 'package:shia_game_flutter/features/battle_league/presentation/controller/battle_league_controller.dart'; @@ -29,11 +28,11 @@ class BattleLeaguePage extends GetView { body: SafeArea( child: Column( children: [ - 20.h.gapHeight, + 20.0.gapHeight, _tabBars(context), - 12.h.gapHeight, + 12.0.gapHeight, _tabViews(), - 56.h.gapHeight, + 56.0.gapHeight, _startButton(context), ], ), diff --git a/lib/features/battle_league/presentation/ui/first_part/battle_league_topic_page.dart b/lib/features/battle_league/presentation/ui/first_part/battle_league_topic_page.dart index fdd795c..9674d7f 100644 --- a/lib/features/battle_league/presentation/ui/first_part/battle_league_topic_page.dart +++ b/lib/features/battle_league/presentation/ui/first_part/battle_league_topic_page.dart @@ -34,11 +34,11 @@ class BattleLeagueTopicPage extends GetView { return Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ - 20.h.gapHeight, + 20.0.gapHeight, _title(context), - 27.h.gapHeight, + 27.0.gapHeight, _topicList(context), - 20.h.gapHeight, + 20.0.gapHeight, _randomButton(context), const Spacer(), _startButton(context), diff --git a/lib/features/battle_league/presentation/ui/first_part/widgets/button/battle_golden_button.dart b/lib/features/battle_league/presentation/ui/first_part/widgets/button/battle_golden_button.dart index 85e7239..7efec50 100644 --- a/lib/features/battle_league/presentation/ui/first_part/widgets/button/battle_golden_button.dart +++ b/lib/features/battle_league/presentation/ui/first_part/widgets/button/battle_golden_button.dart @@ -18,7 +18,7 @@ class BattleGoldenButton extends StatelessWidget { return MyContainer( onTap: onTap, width: context.widthScreen, - height: 64.h, + height: 64, borderRadius: const BorderRadius.all(Radius.circular(20)), borderGradient: const LinearGradient( begin: AlignmentDirectional.topStart, diff --git a/lib/features/battle_league/presentation/ui/first_part/widgets/button/battle_grey_button.dart b/lib/features/battle_league/presentation/ui/first_part/widgets/button/battle_grey_button.dart index 8dd5225..02bd2a7 100644 --- a/lib/features/battle_league/presentation/ui/first_part/widgets/button/battle_grey_button.dart +++ b/lib/features/battle_league/presentation/ui/first_part/widgets/button/battle_grey_button.dart @@ -20,7 +20,7 @@ class BattleGreyButton extends StatelessWidget { Widget build(BuildContext context) { return MyContainer( onTap: onTap, - height: 48.h, + height: 48, width: context.widthScreen, borderRadius: const BorderRadius.all(Radius.circular(12)), borderColor: const Color(0XFF8C9FAC), diff --git a/lib/features/battle_league/presentation/ui/first_part/widgets/button/battle_purple_button.dart b/lib/features/battle_league/presentation/ui/first_part/widgets/button/battle_purple_button.dart index 1d1f967..98ec3ed 100644 --- a/lib/features/battle_league/presentation/ui/first_part/widgets/button/battle_purple_button.dart +++ b/lib/features/battle_league/presentation/ui/first_part/widgets/button/battle_purple_button.dart @@ -14,7 +14,7 @@ class BattlePurpleButton extends StatelessWidget { return MyContainer( onTap: onTap, width: context.widthScreen, - height: 64.h, + height: 64, borderRadius: const BorderRadius.all(Radius.circular(20)), borderGradient: LinearGradient( begin: AlignmentDirectional.topStart, diff --git a/lib/features/battle_league/presentation/ui/first_part/widgets/founded_page/founded_avatar.dart b/lib/features/battle_league/presentation/ui/first_part/widgets/founded_page/founded_avatar.dart index 69f5f8a..5ee4834 100644 --- a/lib/features/battle_league/presentation/ui/first_part/widgets/founded_page/founded_avatar.dart +++ b/lib/features/battle_league/presentation/ui/first_part/widgets/founded_page/founded_avatar.dart @@ -3,7 +3,6 @@ import 'package:shia_game_flutter/common_ui/resources/my_assets.dart'; import 'package:shia_game_flutter/common_ui/resources/my_colors.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/core/utils/gap.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; class FoundedAvatar extends StatelessWidget { @@ -47,7 +46,7 @@ class FoundedAvatar extends StatelessWidget { ), ], ), - 16.h.gapHeight, + 16.0.gapHeight, Text('Jack William', style: Lexend.bold.copyWith(fontSize: 16)), Row( mainAxisSize: MainAxisSize.min, diff --git a/lib/features/battle_league/presentation/ui/first_part/widgets/main_page/my_ranking_widget.dart b/lib/features/battle_league/presentation/ui/first_part/widgets/main_page/my_ranking_widget.dart index 301800b..1b95bbd 100644 --- a/lib/features/battle_league/presentation/ui/first_part/widgets/main_page/my_ranking_widget.dart +++ b/lib/features/battle_league/presentation/ui/first_part/widgets/main_page/my_ranking_widget.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:shia_game_flutter/common_ui/resources/my_assets.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/core/utils/gap.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; class MyRankingWidget extends StatelessWidget { @@ -11,22 +10,22 @@ class MyRankingWidget extends StatelessWidget { @override Widget build(BuildContext context) { return SizedBox( - height: 48.h, + height: 48, child: Row( children: [ Text('1', style: Lexend.extraBold.copyWith(fontSize: 12)), - 20.w.gapWidth, + 20.0.gapWidth, const MyImage(asset: MyAssets.sampleAvatar, size: 20), - 6.w.gapWidth, + 6.0.gapWidth, Expanded( child: Text( 'Amirreza', style: Lexend.medium.copyWith(fontSize: 12), ), ), - 6.w.gapWidth, + 6.0.gapWidth, const MyImage(asset: MyAssets.iconRank), - 6.w.gapWidth, + 6.0.gapWidth, Text('1234', style: Lexend.black.copyWith(fontSize: 12)), ], ), diff --git a/lib/features/battle_league/presentation/ui/first_part/widgets/main_page/ranking_time.dart b/lib/features/battle_league/presentation/ui/first_part/widgets/main_page/ranking_time.dart index 2daa935..879bb18 100644 --- a/lib/features/battle_league/presentation/ui/first_part/widgets/main_page/ranking_time.dart +++ b/lib/features/battle_league/presentation/ui/first_part/widgets/main_page/ranking_time.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/common_ui/theme/my_theme.dart'; import 'package:shia_game_flutter/core/utils/gap.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/container/my_container.dart'; class RankingTime extends StatelessWidget { @@ -25,7 +24,7 @@ class RankingTime extends StatelessWidget { fontSize: 14, ), ), - 8.w.gapWidth, + 8.0.gapWidth, Text( '(May 2024)', style: Lexend.medium.copyWith( @@ -44,7 +43,7 @@ class RankingTime extends StatelessWidget { size: 18, ), ), - 10.w.gapWidth, + 10.0.gapWidth, MyContainer( height: 32, width: 32, diff --git a/lib/features/battle_league/presentation/ui/first_part/widgets/main_page/ranking_widget.dart b/lib/features/battle_league/presentation/ui/first_part/widgets/main_page/ranking_widget.dart index 5ad5976..f908c9b 100644 --- a/lib/features/battle_league/presentation/ui/first_part/widgets/main_page/ranking_widget.dart +++ b/lib/features/battle_league/presentation/ui/first_part/widgets/main_page/ranking_widget.dart @@ -3,7 +3,6 @@ import 'package:shia_game_flutter/common_ui/resources/my_assets.dart'; import 'package:shia_game_flutter/common_ui/resources/my_colors.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/core/utils/gap.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; class RankingWidget extends StatelessWidget { @@ -12,29 +11,29 @@ class RankingWidget extends StatelessWidget { @override Widget build(BuildContext context) { return Container( - height: 48.h, + height: 48, decoration: BoxDecoration( borderRadius: const BorderRadius.all(Radius.circular(10)), color: MyColors.black.withValues(alpha: 0.2), ), child: Row( children: [ - 10.w.gapWidth, + 10.0.gapWidth, Text('1', style: Lexend.extraBold.copyWith(fontSize: 12)), - 20.w.gapWidth, + 20.0.gapWidth, const MyImage(asset: MyAssets.sampleAvatar, size: 20), - 6.w.gapWidth, + 6.0.gapWidth, Expanded( child: Text( 'Amirreza', style: Lexend.medium.copyWith(fontSize: 12), ), ), - 6.w.gapWidth, + 6.0.gapWidth, const MyImage(asset: MyAssets.iconRank), - 6.w.gapWidth, + 6.0.gapWidth, Text('1234', style: Lexend.black.copyWith(fontSize: 12)), - 30.w.gapWidth, + 30.0.gapWidth, ], ), ); diff --git a/lib/features/battle_league/presentation/ui/first_part/widgets/main_page/regional_ranking.dart b/lib/features/battle_league/presentation/ui/first_part/widgets/main_page/regional_ranking.dart index 9d4b216..178fe1f 100644 --- a/lib/features/battle_league/presentation/ui/first_part/widgets/main_page/regional_ranking.dart +++ b/lib/features/battle_league/presentation/ui/first_part/widgets/main_page/regional_ranking.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:shia_game_flutter/core/utils/gap.dart'; import 'package:shia_game_flutter/core/utils/my_localization.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/features/battle_league/presentation/ui/first_part/widgets/main_page/filter_ranking_button.dart'; import 'package:shia_game_flutter/features/battle_league/presentation/ui/first_part/widgets/main_page/my_ranking_widget.dart'; import 'package:shia_game_flutter/features/battle_league/presentation/ui/first_part/widgets/main_page/ranking_region.dart'; @@ -66,9 +65,9 @@ class _RegionalRankingState extends State { ), ), ), - 22.h.gapHeight, + 22.0.gapHeight, const RankingRegion(), - 12.h.gapHeight, + 12.0.gapHeight, Expanded( child: RankingScrollbar( scrollController: scrollController, @@ -77,7 +76,7 @@ class _RegionalRankingState extends State { itemCount: 10, padding: const EdgeInsetsDirectional.only(end: 14), itemBuilder: (context, index) => const RankingWidget(), - separatorBuilder: (context, index) => 10.h.gapHeight, + separatorBuilder: (context, index) => 10.0.gapHeight, ), ), ), diff --git a/lib/features/battle_league/presentation/ui/first_part/widgets/main_page/time_ranking.dart b/lib/features/battle_league/presentation/ui/first_part/widgets/main_page/time_ranking.dart index fdeb1b2..9f3aa11 100644 --- a/lib/features/battle_league/presentation/ui/first_part/widgets/main_page/time_ranking.dart +++ b/lib/features/battle_league/presentation/ui/first_part/widgets/main_page/time_ranking.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:shia_game_flutter/core/utils/gap.dart'; import 'package:shia_game_flutter/core/utils/my_localization.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/features/battle_league/presentation/ui/first_part/widgets/main_page/filter_ranking_button.dart'; import 'package:shia_game_flutter/features/battle_league/presentation/ui/first_part/widgets/main_page/my_ranking_widget.dart'; import 'package:shia_game_flutter/features/battle_league/presentation/ui/first_part/widgets/main_page/ranking_scrollbar.dart'; @@ -67,13 +66,13 @@ class _TimeRankingState extends State { ), ), ), - 22.h.gapHeight, + 22.0.gapHeight, if(selectedIndex != 0) ...{ RankingTime( filterTitles: filterTitles, selectedIndex: selectedIndex, ), - 12.h.gapHeight, + 12.0.gapHeight, }, Expanded( child: RankingScrollbar( @@ -83,7 +82,7 @@ class _TimeRankingState extends State { itemCount: 10, padding: const EdgeInsetsDirectional.only(end: 14), itemBuilder: (context, index) => const RankingWidget(), - separatorBuilder: (context, index) => 10.h.gapHeight, + separatorBuilder: (context, index) => 10.0.gapHeight, ), ), ), diff --git a/lib/features/battle_league/presentation/ui/first_part/widgets/rank_title.dart b/lib/features/battle_league/presentation/ui/first_part/widgets/rank_title.dart index a3a73a1..fd49954 100644 --- a/lib/features/battle_league/presentation/ui/first_part/widgets/rank_title.dart +++ b/lib/features/battle_league/presentation/ui/first_part/widgets/rank_title.dart @@ -12,7 +12,7 @@ class RankTitle extends StatelessWidget { @override Widget build(BuildContext context) { return Container( - height: 42.h, + height: 42, width: context.widthScreen, alignment: Alignment.center, padding: const EdgeInsets.symmetric(horizontal: 17), @@ -33,9 +33,9 @@ class RankTitle extends StatelessWidget { ), ), ), - 15.w.gapWidth, + 15.0.gapWidth, const MyImage(asset: MyAssets.iconRank), - 4.w.gapWidth, + 4.0.gapWidth, Text('265', style: Lexend.bold.copyWith(fontSize: 12)), ], ), diff --git a/lib/features/battle_league/presentation/ui/first_part/widgets/topic_page/topic_widget.dart b/lib/features/battle_league/presentation/ui/first_part/widgets/topic_page/topic_widget.dart index be2294e..918e31b 100644 --- a/lib/features/battle_league/presentation/ui/first_part/widgets/topic_page/topic_widget.dart +++ b/lib/features/battle_league/presentation/ui/first_part/widgets/topic_page/topic_widget.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:shia_game_flutter/common_ui/resources/my_colors.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.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/features/battle_league/domain/entity/topics_entity.dart'; @@ -24,8 +23,8 @@ class TopicWidget extends StatelessWidget { onTap: () { onPressed?.call(topic); }, - height: 48.h, - width: 148.w, + height: 48, + width: 148, borderRadius: const BorderRadius.all(Radius.circular(12)), borderGradient: !selected ? null : LinearGradient( begin: AlignmentDirectional.centerStart, diff --git a/lib/features/battle_league/presentation/ui/second_part/battle_league_result_page.dart b/lib/features/battle_league/presentation/ui/second_part/battle_league_result_page.dart index 8647791..88a663f 100644 --- a/lib/features/battle_league/presentation/ui/second_part/battle_league_result_page.dart +++ b/lib/features/battle_league/presentation/ui/second_part/battle_league_result_page.dart @@ -42,7 +42,7 @@ class BattleLeagueResultPage extends GetView { style: Lexend.black, ), ), - Spacer(), + const Spacer(), Padding( padding: const EdgeInsets.symmetric(horizontal: 16), child: BattlePurpleButton( diff --git a/lib/features/battle_league/presentation/ui/second_part/widgets/battle_league_question_avatar.dart b/lib/features/battle_league/presentation/ui/second_part/widgets/battle_league_question_avatar.dart index b8eca26..d03b247 100644 --- a/lib/features/battle_league/presentation/ui/second_part/widgets/battle_league_question_avatar.dart +++ b/lib/features/battle_league/presentation/ui/second_part/widgets/battle_league_question_avatar.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:shia_game_flutter/common_ui/resources/my_assets.dart'; import 'package:shia_game_flutter/common_ui/resources/my_colors.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; class BattleLeagueQuestionAvatar extends StatelessWidget { @@ -14,7 +13,7 @@ class BattleLeagueQuestionAvatar extends StatelessWidget { Widget build(BuildContext context) { return Column( mainAxisSize: MainAxisSize.min, - spacing: 12.h, + spacing: 12, children: [ Stack( alignment: Alignment.center, diff --git a/lib/features/battle_league/presentation/ui/second_part/widgets/question_board.dart b/lib/features/battle_league/presentation/ui/second_part/widgets/question_board.dart index 62bdcef..38df5aa 100644 --- a/lib/features/battle_league/presentation/ui/second_part/widgets/question_board.dart +++ b/lib/features/battle_league/presentation/ui/second_part/widgets/question_board.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/features/battle_league/presentation/ui/second_part/widgets/battle_league_question_avatar.dart'; class QuestionBoard extends StatelessWidget { @@ -20,7 +19,7 @@ class QuestionBoard extends StatelessWidget { @override Widget build(BuildContext context) { return Padding( - padding: EdgeInsets.symmetric(horizontal: 30.w), + padding: const EdgeInsets.symmetric(horizontal: 30), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ diff --git a/lib/features/battle_league/presentation/ui/second_part/widgets/question_timer_ready_widget.dart b/lib/features/battle_league/presentation/ui/second_part/widgets/question_timer_ready_widget.dart index 51156fa..138b325 100644 --- a/lib/features/battle_league/presentation/ui/second_part/widgets/question_timer_ready_widget.dart +++ b/lib/features/battle_league/presentation/ui/second_part/widgets/question_timer_ready_widget.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:shia_game_flutter/common_ui/resources/my_assets.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; import 'package:shia_game_flutter/core/widgets/text/gradient_text.dart'; @@ -11,15 +10,15 @@ class QuestionTimerReadyWidget extends StatelessWidget { @override Widget build(BuildContext context) { return Column( - spacing: 12.h, + spacing: 12, children: [ Stack( alignment: Alignment.center, children: [ const MyImage(asset: MyAssets.timer), Positioned( - left: 28.w, - top: 26.h, + left: 28, + top: 26, child: Text( '5', style: Lexend.extraBold.copyWith( diff --git a/lib/features/home/presentation/pages/home_page.dart b/lib/features/home/presentation/pages/home_page.dart index dfaf39e..968c1e9 100644 --- a/lib/features/home/presentation/pages/home_page.dart +++ b/lib/features/home/presentation/pages/home_page.dart @@ -3,7 +3,6 @@ import 'package:get/get.dart'; import 'package:shia_game_flutter/common_ui/resources/my_assets.dart'; import 'package:shia_game_flutter/core/utils/gap.dart'; import 'package:shia_game_flutter/core/utils/my_localization.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/background/my_background.dart'; import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; import 'package:shia_game_flutter/features/home/presentation/controller/home_controller.dart'; @@ -22,12 +21,12 @@ class HomePage extends GetView { child: Column( children: [ _image(), - 40.h.gapHeight, + 40.0.gapHeight, const HomeMembership(), _homeBattleLeague(), - 20.h.gapHeight, + 20.0.gapHeight, _customWidgets(context), - 20.h.gapHeight, + 20.0.gapHeight, const HomeBattleCast(), ], ), 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 e1d7d96..5e52915 100644 --- a/lib/features/home/presentation/pages/widgets/home_battle_cast.dart +++ b/lib/features/home/presentation/pages/widgets/home_battle_cast.dart @@ -4,7 +4,6 @@ import 'package:shia_game_flutter/common_ui/resources/my_assets.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/core/utils/gap.dart'; import 'package:shia_game_flutter/core/utils/my_localization.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'; @@ -21,7 +20,7 @@ class HomeBattleCast extends StatelessWidget { clipBehavior: Clip.none, children: [ MyContainer( - height: 120.h, + height: 120, borderRadius: const BorderRadius.all(Radius.circular(20)), borderGradient: const LinearGradient( begin: AlignmentDirectional.topCenter, @@ -54,7 +53,7 @@ class HomeBattleCast extends StatelessWidget { shadowColor: const Color(0xFF3C38C4), fontSize: 22, ), - 10.h.gapHeight, + 10.0.gapHeight, Container( padding: const EdgeInsets.all(5), decoration: BoxDecoration( 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 f5b1dd4..7bc992a 100644 --- a/lib/features/home/presentation/pages/widgets/home_battle_league.dart +++ b/lib/features/home/presentation/pages/widgets/home_battle_league.dart @@ -21,7 +21,7 @@ class HomeBattleLeague extends StatelessWidget { MyContainer( onTap: onTap, width: context.widthScreen, - height: 120.h, + height: 120, padding: const EdgeInsets.symmetric( horizontal: 12, vertical: 16, 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 a345e6f..d07ad21 100644 --- a/lib/features/home/presentation/pages/widgets/home_custom_widget.dart +++ b/lib/features/home/presentation/pages/widgets/home_custom_widget.dart @@ -23,7 +23,7 @@ class HomeCustomWidget extends StatelessWidget { @override Widget build(BuildContext context) { return MyContainer( - height: 130.h, + height: 130, borderRadius: const BorderRadius.all(Radius.circular(20)), borderGradient: CustomWidgetType.borderGradient[type], gradient: CustomWidgetType.gradient[type], @@ -45,7 +45,7 @@ class HomeCustomWidget extends StatelessWidget { ), const Spacer(), CustomWidgetType.title[type] ?? const SizedBox.shrink(), - 10.h.gapHeight, + 10.0.gapHeight, Container( padding: const EdgeInsets.all(5), width: context.widthScreen, diff --git a/lib/features/home/presentation/pages/widgets/home_membership.dart b/lib/features/home/presentation/pages/widgets/home_membership.dart index 6a6fd29..7c1d5af 100644 --- a/lib/features/home/presentation/pages/widgets/home_membership.dart +++ b/lib/features/home/presentation/pages/widgets/home_membership.dart @@ -38,7 +38,7 @@ class HomeMembership extends StatelessWidget { child: Row( children: [ const MyImage(asset: MyAssets.iconCrown, size: 24), - 8.w.gapWidth, + 8.0.gapWidth, Text( context.translate.pro_membership, style: Lexend.semiBold.copyWith( @@ -48,7 +48,7 @@ class HomeMembership extends StatelessWidget { ), const Spacer(), const MyImage(asset: MyAssets.iconClock), - 6.w.gapWidth, + 6.0.gapWidth, Text('125d 4h', style: Lexend.semiBold.copyWith(fontSize: 12)), ], ), diff --git a/lib/features/home/presentation/pages/widgets/home_username_dialog.dart b/lib/features/home/presentation/pages/widgets/home_username_dialog.dart index 747f8f5..05980ac 100644 --- a/lib/features/home/presentation/pages/widgets/home_username_dialog.dart +++ b/lib/features/home/presentation/pages/widgets/home_username_dialog.dart @@ -4,7 +4,6 @@ import 'package:get/get.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/core/status/base_status.dart'; import 'package:shia_game_flutter/core/utils/my_localization.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/input/my_input.dart'; import 'package:shia_game_flutter/core/widgets/text/gradient_text.dart'; @@ -17,7 +16,7 @@ class UsernameDialog extends GetView { Widget build(BuildContext context) { return MyContainer( padding: const EdgeInsets.only(left: 30, right: 30, bottom: 30, top: 13), - margin: EdgeInsets.symmetric(horizontal: 30.w, vertical: 290.h), + margin: const EdgeInsets.symmetric(horizontal: 30, vertical: 290), borderGradient: const LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, @@ -51,7 +50,7 @@ class UsernameDialog extends GetView { Obx( () => MyContainer( onTap: controller.loginGuest, - height: 41.h, + height: 41, loading: controller.loginGuestStatus.value is BaseLoading, borderRadius: const BorderRadius.all(Radius.circular(12)), gradient: const RadialGradient( diff --git a/lib/features/intro/presentation/ui/intro_page.dart b/lib/features/intro/presentation/ui/intro_page.dart index 93c67c3..7ad5080 100644 --- a/lib/features/intro/presentation/ui/intro_page.dart +++ b/lib/features/intro/presentation/ui/intro_page.dart @@ -34,53 +34,53 @@ class IntroPage extends GetView { } Stack _logo(BuildContext context) { - return Stack( + return const Stack( clipBehavior: Clip.none, alignment: Alignment.center, children: [ - const MyImage(asset: MyAssets.shiaMind), + MyImage(asset: MyAssets.shiaMind), PositionedDirectional( - top: -124.h, - end: -62.w, - child: const MyImage(asset: MyAssets.question), + top: -124, + end: -62, + child: MyImage(asset: MyAssets.question), ), PositionedDirectional( - top: -157.h, - end: 60.w, - child: const MyImage(asset: MyAssets.question, size: 30), + top: -157, + end: 60, + child: MyImage(asset: MyAssets.question, size: 30), ), PositionedDirectional( - top: -90.h, - start: -30.w, - child: const MyImage(asset: MyAssets.question, size: 25), + top: -90, + start: -30, + child: MyImage(asset: MyAssets.question, size: 25), ), PositionedDirectional( - bottom: -90.h, - start: -30.w, - child: const MyImage(asset: MyAssets.question), + bottom: -90, + start: -30, + child: MyImage(asset: MyAssets.question), ), PositionedDirectional( - bottom: -90.h, - end: -62.w, - child: const MyImage(asset: MyAssets.question, size: 15), + bottom: -90, + end: -62, + child: MyImage(asset: MyAssets.question, size: 15), ), PositionedDirectional( - bottom: -10.h, - end: 70.w, - child: const MyImage(asset: MyAssets.question, size: 15), + bottom: -10, + end: 70, + child: MyImage(asset: MyAssets.question, size: 15), ), PositionedDirectional( - top: -15.h, - child: const MyImage(asset: MyAssets.introStar, size: 75), + top: -15, + child: MyImage(asset: MyAssets.introStar, size: 75), ), ], ); } Positioned _bottomLoading(BuildContext context) { - return Positioned( - bottom: 16.h, - child: const MyLinearLoading() + return const Positioned( + bottom: 16, + child: MyLinearLoading() ); } } diff --git a/lib/features/profile/presentation/ui/profile_page.dart b/lib/features/profile/presentation/ui/profile_page.dart index 2053555..b627e26 100644 --- a/lib/features/profile/presentation/ui/profile_page.dart +++ b/lib/features/profile/presentation/ui/profile_page.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:shia_game_flutter/core/utils/gap.dart'; import 'package:shia_game_flutter/core/utils/my_localization.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/background/my_background.dart'; import 'package:shia_game_flutter/core/widgets/button/my_gradient_button.dart'; import 'package:shia_game_flutter/core/widgets/input/my_input.dart'; @@ -22,11 +21,11 @@ class ProfilePage extends GetView { children: [ const ProfileAvatar(), _changeProfileBtn(context), - 40.h.gapHeight, + 40.0.gapHeight, _userNameInput(context), - 28.h.gapHeight, + 28.0.gapHeight, _locationInput(context), - 150.h.gapHeight, + 150.0.gapHeight, _bottomButtons(), ], ), 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 0863e86..c41d265 100644 --- a/lib/features/profile/presentation/ui/widgets/profile_delete_account.dart +++ b/lib/features/profile/presentation/ui/widgets/profile_delete_account.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/common_ui/theme/my_theme.dart'; import 'package:shia_game_flutter/core/utils/my_localization.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/container/my_container.dart'; class ProfileDeleteAccount extends StatelessWidget { @@ -11,7 +10,7 @@ class ProfileDeleteAccount extends StatelessWidget { @override Widget build(BuildContext context) { return MyContainer( - height: 58.h, + height: 58, onTap: () {}, borderRadius: const BorderRadius.all(Radius.circular(12)), color: context.backgroundColor, diff --git a/lib/features/profile/presentation/ui/widgets/profile_logout.dart b/lib/features/profile/presentation/ui/widgets/profile_logout.dart index a4f39cd..9c72be5 100644 --- a/lib/features/profile/presentation/ui/widgets/profile_logout.dart +++ b/lib/features/profile/presentation/ui/widgets/profile_logout.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:shia_game_flutter/common_ui/resources/my_assets.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/core/utils/my_localization.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'; @@ -12,7 +11,7 @@ class ProfileLogout extends StatelessWidget { @override Widget build(BuildContext context) { return MyContainer( - height: 58.h, + height: 58, onTap: () {}, borderRadius: const BorderRadius.all(Radius.circular(12)), color: const Color(0XFF270A59), diff --git a/lib/features/shop/presentation/ui/shop_page.dart b/lib/features/shop/presentation/ui/shop_page.dart index 49e6f94..1e80092 100644 --- a/lib/features/shop/presentation/ui/shop_page.dart +++ b/lib/features/shop/presentation/ui/shop_page.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:shia_game_flutter/core/utils/gap.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/background/my_background.dart'; import 'package:shia_game_flutter/features/shop/presentation/controller/shop_controller.dart'; import 'package:shia_game_flutter/features/shop/presentation/ui/widgets/shop_package_entity.dart'; @@ -19,7 +18,7 @@ class ShopPage extends GetView { itemBuilder: (context, index) => ShopPackageWidget( shopPackage: controller.shopList[index], ), - separatorBuilder: (context, index) => 20.h.gapHeight, + separatorBuilder: (context, index) => 20.0.gapHeight, ), ), ); 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 e00ef95..43f221f 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 @@ -1,5 +1,4 @@ import 'package:flutter/material.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/features/shop/domain/entity/shop_entity.dart'; import 'package:shia_game_flutter/features/shop/presentation/ui/widgets/shop_item/styles/book_style.dart'; @@ -19,8 +18,8 @@ class ShopItemWidget extends StatelessWidget { @override Widget build(BuildContext context) { return MyContainer( - height: shop.type == ShopType.book ? 260.h : 213.h, - width: 150.w, + height: shop.type == ShopType.book ? 260 : 213, + width: 150, color: const Color(0XFF1B0B38), borderColor: const Color(0XFF462A79), borderRadius: const BorderRadius.all(Radius.circular(14)), 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 e173324..3c8ba58 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 @@ -3,7 +3,6 @@ import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/common_ui/theme/my_theme.dart'; import 'package:shia_game_flutter/core/utils/gap.dart'; import 'package:shia_game_flutter/core/utils/my_localization.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/button/my_gradient_button.dart'; import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; import 'package:shia_game_flutter/features/shop/domain/entity/shop_entity.dart'; @@ -33,7 +32,7 @@ class BookStyle extends StatelessWidget { ), ), ), - 8.h.gapHeight, + 8.0.gapHeight, SizedBox( width: 110, child: Text( @@ -45,7 +44,7 @@ class BookStyle extends StatelessWidget { ), ), ), - 18.h.gapHeight, + 18.0.gapHeight, MyGradientButton( onTap: () {}, title: context.translate.select, 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 f80c42e..1406a28 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 @@ -3,7 +3,6 @@ import 'package:shia_game_flutter/common_ui/resources/my_assets.dart'; import 'package:shia_game_flutter/common_ui/resources/my_colors.dart'; import 'package:shia_game_flutter/core/utils/my_localization.dart'; import 'package:shia_game_flutter/core/utils/number_format.dart'; -import 'package:shia_game_flutter/core/utils/screen_size.dart'; import 'package:shia_game_flutter/core/widgets/button/enum/my_button_type.dart'; import 'package:shia_game_flutter/core/widgets/button/my_gradient_button.dart'; import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; @@ -21,7 +20,7 @@ class CharacterStyle extends StatelessWidget { children: [ Expanded( child: AnimatedContainer( - width: 120.w, + width: 120, duration: const Duration(milliseconds: 200), decoration: BoxDecoration( border:Border.all(width: 2, color: const Color(0xFFB37EFA)), 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 93d3e93..25fc94f 100644 --- a/lib/features/shop/presentation/ui/widgets/shop_package_entity.dart +++ b/lib/features/shop/presentation/ui/widgets/shop_package_entity.dart @@ -53,7 +53,7 @@ class ShopPackageWidget extends StatelessWidget { ), ], ), - 30.h.gapHeight, + 30.0.gapHeight, Wrap( direction: Axis.horizontal, spacing: 7,