Browse Source

add: internet permission

pull/20/head
AmirrezaChegini 5 days ago
parent
commit
99baf57f33
  1. 7
      lib/core/utils/screen_size.dart
  2. 3
      lib/core/widgets/app_bar/my_app_bar.dart
  3. 5
      lib/core/widgets/app_bar/styles/master_app_bar.dart
  4. 5
      lib/core/widgets/app_bar/widgets/app_bar_add_widget.dart
  5. 3
      lib/core/widgets/bottom_nav_bar/bottom_nav_bar.dart
  6. 3
      lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_item.dart
  7. 7
      lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_profile_item.dart
  8. 7
      lib/core/widgets/button/styles/active_style.dart
  9. 7
      lib/core/widgets/button/styles/default_style.dart
  10. 9
      lib/core/widgets/loading/my_linear_loading.dart
  11. 6
      lib/core/widgets/stepper/my_stepper.dart
  12. 2
      lib/features/awards/presentation/ui/widgets/award_widget.dart
  13. 4
      lib/features/battle_league/presentation/controller/battle_league_controller.dart
  14. 5
      lib/features/battle_league/presentation/ui/first_part/battle_league_finding_page.dart
  15. 7
      lib/features/battle_league/presentation/ui/first_part/battle_league_founded_page.dart
  16. 7
      lib/features/battle_league/presentation/ui/first_part/battle_league_page.dart
  17. 6
      lib/features/battle_league/presentation/ui/first_part/battle_league_topic_page.dart
  18. 2
      lib/features/battle_league/presentation/ui/first_part/widgets/button/battle_golden_button.dart
  19. 2
      lib/features/battle_league/presentation/ui/first_part/widgets/button/battle_grey_button.dart
  20. 2
      lib/features/battle_league/presentation/ui/first_part/widgets/button/battle_purple_button.dart
  21. 3
      lib/features/battle_league/presentation/ui/first_part/widgets/founded_page/founded_avatar.dart
  22. 11
      lib/features/battle_league/presentation/ui/first_part/widgets/main_page/my_ranking_widget.dart
  23. 5
      lib/features/battle_league/presentation/ui/first_part/widgets/main_page/ranking_time.dart
  24. 15
      lib/features/battle_league/presentation/ui/first_part/widgets/main_page/ranking_widget.dart
  25. 7
      lib/features/battle_league/presentation/ui/first_part/widgets/main_page/regional_ranking.dart
  26. 7
      lib/features/battle_league/presentation/ui/first_part/widgets/main_page/time_ranking.dart
  27. 6
      lib/features/battle_league/presentation/ui/first_part/widgets/rank_title.dart
  28. 5
      lib/features/battle_league/presentation/ui/first_part/widgets/topic_page/topic_widget.dart
  29. 2
      lib/features/battle_league/presentation/ui/second_part/battle_league_result_page.dart
  30. 3
      lib/features/battle_league/presentation/ui/second_part/widgets/battle_league_question_avatar.dart
  31. 3
      lib/features/battle_league/presentation/ui/second_part/widgets/question_board.dart
  32. 7
      lib/features/battle_league/presentation/ui/second_part/widgets/question_timer_ready_widget.dart
  33. 7
      lib/features/home/presentation/pages/home_page.dart
  34. 5
      lib/features/home/presentation/pages/widgets/home_battle_cast.dart
  35. 2
      lib/features/home/presentation/pages/widgets/home_battle_league.dart
  36. 4
      lib/features/home/presentation/pages/widgets/home_custom_widget.dart
  37. 4
      lib/features/home/presentation/pages/widgets/home_membership.dart
  38. 5
      lib/features/home/presentation/pages/widgets/home_username_dialog.dart
  39. 50
      lib/features/intro/presentation/ui/intro_page.dart
  40. 7
      lib/features/profile/presentation/ui/profile_page.dart
  41. 3
      lib/features/profile/presentation/ui/widgets/profile_delete_account.dart
  42. 3
      lib/features/profile/presentation/ui/widgets/profile_logout.dart
  43. 3
      lib/features/shop/presentation/ui/shop_page.dart
  44. 5
      lib/features/shop/presentation/ui/widgets/shop_item/shop_item_widget.dart
  45. 5
      lib/features/shop/presentation/ui/widgets/shop_item/styles/book_style.dart
  46. 3
      lib/features/shop/presentation/ui/widgets/shop_item/styles/character_style.dart
  47. 2
      lib/features/shop/presentation/ui/widgets/shop_package_entity.dart

7
lib/core/utils/screen_size.dart

@ -1,13 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart';
extension ScreenSize on BuildContext { extension ScreenSize on BuildContext {
double get widthScreen => MediaQuery.sizeOf(this).width; double get widthScreen => MediaQuery.sizeOf(this).width;
double get heightScreen => MediaQuery.sizeOf(this).height; 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());
}

3
lib/core/widgets/app_bar/my_app_bar.dart

@ -1,5 +1,4 @@
import 'package:flutter/material.dart'; 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'; import 'package:shia_game_flutter/core/widgets/app_bar/enums/app_bar_type.dart';
class MyAppBar extends StatelessWidget implements PreferredSizeWidget { class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
@ -35,7 +34,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
return AppBar( return AppBar(
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
centerTitle: true, centerTitle: true,
titleSpacing: 30.w,
titleSpacing: 30,
scrolledUnderElevation: 0, scrolledUnderElevation: 0,
title: AppBarType.title( title: AppBarType.title(
title: title, title: title,

5
lib/core/widgets/app_bar/styles/master_app_bar.dart

@ -1,7 +1,6 @@
import 'package:flutter/material.dart'; 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_assets.dart';
import 'package:shia_game_flutter/core/utils/gap.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_action.dart';
import 'package:shia_game_flutter/core/widgets/app_bar/widgets/app_bar_add_widget.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), const Color(0XFF4F16A0),
], ],
), ),
6.w.gapWidth,
6.0.gapWidth,
AppBarAddWidget( AppBarAddWidget(
onTap: onFlashTap, onTap: onFlashTap,
icon: MyAssets.iconFlash, icon: MyAssets.iconFlash,
@ -52,7 +51,7 @@ class MasterAppBar extends StatelessWidget implements PreferredSizeWidget {
icon: MyAssets.iconShare, icon: MyAssets.iconShare,
onTap: onShareTap, onTap: onShareTap,
), ),
12.w.gapWidth,
12.0.gapWidth,
AppBarAction( AppBarAction(
icon: MyAssets.iconSetting, icon: MyAssets.iconSetting,
onTap: onSettingTap, onTap: onSettingTap,

5
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_assets.dart';
import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
import 'package:shia_game_flutter/common_ui/theme/my_theme.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/container/my_container.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
@ -24,8 +23,8 @@ class AppBarAddWidget extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MyContainer( return MyContainer(
onTap: onTap, onTap: onTap,
width: 96.w,
height: 32.h,
width: 96,
height: 32,
borderRadius: const BorderRadius.all(Radius.circular(50)), borderRadius: const BorderRadius.all(Radius.circular(50)),
borderGradient: LinearGradient( borderGradient: LinearGradient(
begin: AlignmentDirectional.topStart, begin: AlignmentDirectional.topStart,

3
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/rx_flutter/rx_obx_widget.dart';
import 'package:get/get_state_manager/src/simple/get_view.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/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_item.dart';
import 'package:shia_game_flutter/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_profile_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'; import 'package:shia_game_flutter/features/master/presentation/controller/master_controller.dart';
@ -13,7 +12,7 @@ class BottomNavBar extends GetView<MasterController> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
padding: EdgeInsets.symmetric(horizontal: 30.w),
padding: const EdgeInsets.symmetric(horizontal: 30),
decoration: const BoxDecoration( decoration: const BoxDecoration(
gradient: RadialGradient( gradient: RadialGradient(
radius: 2.5, radius: 2.5,

3
lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_item.dart

@ -1,6 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
import 'package:shia_game_flutter/core/utils/screen_size.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.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'; import 'package:shia_game_flutter/features/master/domain/entity/bottom_nav_entity.dart';
@ -12,7 +11,7 @@ class BottomNavBarItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Column( return Column(
spacing: 4.h,
spacing: 4,
children: [ children: [
MyImage(asset: bottomNavEntity.icon ?? ''), MyImage(asset: bottomNavEntity.icon ?? ''),
Text( Text(

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

@ -1,6 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
import 'package:shia_game_flutter/core/utils/screen_size.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.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'; import 'package:shia_game_flutter/features/master/domain/entity/bottom_nav_entity.dart';
@ -12,11 +11,11 @@ class BottomNavBarProfileItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Column( return Column(
spacing: 4.h,
spacing: 4,
children: [ children: [
Container( Container(
height: 26.h,
width: 26.w,
height: 26,
width: 26,
padding: const EdgeInsets.all(3), padding: const EdgeInsets.all(3),
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,

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

@ -1,6 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:shia_game_flutter/core/utils/gap.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/container/my_container.dart';
import 'package:shia_game_flutter/core/widgets/text/gradient_text.dart'; import 'package:shia_game_flutter/core/widgets/text/gradient_text.dart';
@ -21,8 +20,8 @@ class ActiveStyle extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MyContainer( return MyContainer(
height: 32.h,
width: 116.w,
height: 32,
width: 116,
onTap: onTap, onTap: onTap,
borderRadius: const BorderRadius.all(Radius.circular(5)), borderRadius: const BorderRadius.all(Radius.circular(5)),
borderGradient: LinearGradient( borderGradient: LinearGradient(
@ -48,7 +47,7 @@ class ActiveStyle extends StatelessWidget {
fontSize: fontSize ?? 12, fontSize: fontSize ?? 12,
), ),
if (icon != null) ...{ if (icon != null) ...{
6.w.gapWidth,
6.0.gapWidth,
icon ?? const SizedBox.shrink(), icon ?? const SizedBox.shrink(),
}, },
], ],

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

@ -1,6 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:shia_game_flutter/core/utils/gap.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/container/my_container.dart';
import 'package:shia_game_flutter/core/widgets/text/gradient_text.dart'; import 'package:shia_game_flutter/core/widgets/text/gradient_text.dart';
@ -21,8 +20,8 @@ class DefaultStyle extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MyContainer( return MyContainer(
height: 32.h,
width: 116.w,
height: 32,
width: 116,
onTap: onTap, onTap: onTap,
borderColor: const Color(0XFF6D2ADA), borderColor: const Color(0XFF6D2ADA),
borderRadius: const BorderRadius.all(Radius.circular(5)), borderRadius: const BorderRadius.all(Radius.circular(5)),
@ -42,7 +41,7 @@ class DefaultStyle extends StatelessWidget {
fontSize: fontSize ?? 12, fontSize: fontSize ?? 12,
), ),
if (icon != null) ...{ if (icon != null) ...{
6.w.gapWidth,
6.0.gapWidth,
icon ?? const SizedBox.shrink(), icon ?? const SizedBox.shrink(),
}, },
], ],

9
lib/core/widgets/loading/my_linear_loading.dart

@ -1,7 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
import 'package:shia_game_flutter/core/utils/my_localization.dart'; import 'package:shia_game_flutter/core/utils/my_localization.dart';
import 'package:shia_game_flutter/core/utils/screen_size.dart';
class MyLinearLoading extends StatelessWidget { class MyLinearLoading extends StatelessWidget {
const MyLinearLoading({ const MyLinearLoading({
@ -11,7 +10,7 @@ class MyLinearLoading extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Column( return Column(
spacing: 10.h,
spacing: 10,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Text( Text(
@ -19,8 +18,8 @@ class MyLinearLoading extends StatelessWidget {
style: Lexend.regular.copyWith(fontSize: 12), style: Lexend.regular.copyWith(fontSize: 12),
), ),
Container( Container(
width: 188.w,
height: 16.h,
width: 188,
height: 16,
padding: const EdgeInsetsDirectional.only( padding: const EdgeInsetsDirectional.only(
start: 2, start: 2,
top: 2, top: 2,
@ -36,7 +35,7 @@ class MyLinearLoading extends StatelessWidget {
), ),
), ),
child: Container( child: Container(
height: 14.h,
height: 14,
decoration: ShapeDecoration( decoration: ShapeDecoration(
shape: StadiumBorder( shape: StadiumBorder(
side: BorderSide( side: BorderSide(

6
lib/core/widgets/stepper/my_stepper.dart

@ -8,10 +8,10 @@ class MyStepper extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
height: 30.h,
height: 30,
width: context.widthScreen, width: context.widthScreen,
alignment: Alignment.center, alignment: Alignment.center,
padding: EdgeInsets.symmetric(horizontal: 16.w),
padding: const EdgeInsets.symmetric(horizontal: 16),
decoration: const ShapeDecoration( decoration: const ShapeDecoration(
shape: StadiumBorder(), shape: StadiumBorder(),
color: Color(0XFF3A1570), color: Color(0XFF3A1570),
@ -20,7 +20,7 @@ class MyStepper extends StatelessWidget {
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
Container( Container(
height: 3.h,
height: 3,
width: context.widthScreen, width: context.widthScreen,
decoration: const ShapeDecoration( decoration: const ShapeDecoration(
shape: StadiumBorder(), shape: StadiumBorder(),

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

@ -80,7 +80,7 @@ class _AwardWidgetState extends State<AwardWidget> {
spacing: 12, spacing: 12,
children: [ children: [
SizedBox( SizedBox(
height: 100.h,
height: 100,
child: Stack( child: Stack(
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [

4
lib/features/battle_league/presentation/controller/battle_league_controller.dart

@ -101,12 +101,10 @@ class BattleLeagueController extends GetxController
} }
void goToFindingPage() { void goToFindingPage() {
print(AuthStorage.token);
Get.toNamed(Routes.battleLeagueFindingPage); Get.toNamed(Routes.battleLeagueFindingPage);
_webSocketService.connect(); _webSocketService.connect();
_webSocketService.clientConnected.listen((event) { _webSocketService.clientConnected.listen((event) {
clientID = json.decode(utf8.decode(event.data))['player_id']; clientID = json.decode(utf8.decode(event.data))['player_id'];
print(clientID);
getClock(); getClock();
connectStatus.value = const BaseComplete(); connectStatus.value = const BaseComplete();
}); });
@ -167,10 +165,8 @@ class BattleLeagueController extends GetxController
final String lockedBy = json.decode( final String lockedBy = json.decode(
utf8.decode(event.data))['locked_by']; utf8.decode(event.data))['locked_by'];
if (lockedBy == enemyId) { if (lockedBy == enemyId) {
print('rich enemy');
enemyWonNumber.value = enemyWonNumber.value + 1; enemyWonNumber.value = enemyWonNumber.value + 1;
} else { } else {
print('rich myself');
myWonNumber.value = myWonNumber.value + 1; myWonNumber.value = myWonNumber.value + 1;
} }
} }

5
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/status/base_status.dart';
import 'package:shia_game_flutter/core/utils/gap.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/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/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/controller/battle_league_controller.dart';
import 'package:shia_game_flutter/features/battle_league/presentation/ui/first_part/widgets/button/battle_purple_button.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<BattleLeagueController> {
padding: const EdgeInsets.symmetric(horizontal: 30), padding: const EdgeInsets.symmetric(horizontal: 30),
child: Column( child: Column(
children: [ children: [
20.h.gapHeight,
20.0.gapHeight,
const RankTitle(), const RankTitle(),
const Spacer(), const Spacer(),
_findingImage(context), _findingImage(context),
const Spacer(), const Spacer(),
_description(context), _description(context),
37.h.gapHeight,
37.0.gapHeight,
_startFindingButton(context), _startFindingButton(context),
], ],
), ),

7
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_assets.dart';
import 'package:shia_game_flutter/common_ui/resources/my_colors.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/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/image/my_image.dart';
import 'package:shia_game_flutter/core/widgets/loading/my_linear_loading.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'; import 'package:shia_game_flutter/features/battle_league/presentation/controller/battle_league_controller.dart';
@ -26,13 +25,13 @@ class BattleLeagueFoundedPage extends GetView<BattleLeagueController> {
padding: const EdgeInsets.symmetric(horizontal: 30), padding: const EdgeInsets.symmetric(horizontal: 30),
child: Column( child: Column(
children: [ children: [
20.h.gapHeight,
20.0.gapHeight,
const RankTitle(), const RankTitle(),
50.h.gapHeight,
50.0.gapHeight,
const FoundedAvatar(), const FoundedAvatar(),
_image(), _image(),
const FoundedAvatar(), const FoundedAvatar(),
50.h.gapHeight,
50.0.gapHeight,
const MyLinearLoading(), const MyLinearLoading(),
], ],
), ),

7
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/common_ui/theme/my_theme.dart';
import 'package:shia_game_flutter/core/utils/gap.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/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/enums/app_bar_type.dart';
import 'package:shia_game_flutter/core/widgets/app_bar/my_app_bar.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'; import 'package:shia_game_flutter/features/battle_league/presentation/controller/battle_league_controller.dart';
@ -29,11 +28,11 @@ class BattleLeaguePage extends GetView<BattleLeagueController> {
body: SafeArea( body: SafeArea(
child: Column( child: Column(
children: [ children: [
20.h.gapHeight,
20.0.gapHeight,
_tabBars(context), _tabBars(context),
12.h.gapHeight,
12.0.gapHeight,
_tabViews(), _tabViews(),
56.h.gapHeight,
56.0.gapHeight,
_startButton(context), _startButton(context),
], ],
), ),

6
lib/features/battle_league/presentation/ui/first_part/battle_league_topic_page.dart

@ -34,11 +34,11 @@ class BattleLeagueTopicPage extends GetView<BattleLeagueController> {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
20.h.gapHeight,
20.0.gapHeight,
_title(context), _title(context),
27.h.gapHeight,
27.0.gapHeight,
_topicList(context), _topicList(context),
20.h.gapHeight,
20.0.gapHeight,
_randomButton(context), _randomButton(context),
const Spacer(), const Spacer(),
_startButton(context), _startButton(context),

2
lib/features/battle_league/presentation/ui/first_part/widgets/button/battle_golden_button.dart

@ -18,7 +18,7 @@ class BattleGoldenButton extends StatelessWidget {
return MyContainer( return MyContainer(
onTap: onTap, onTap: onTap,
width: context.widthScreen, width: context.widthScreen,
height: 64.h,
height: 64,
borderRadius: const BorderRadius.all(Radius.circular(20)), borderRadius: const BorderRadius.all(Radius.circular(20)),
borderGradient: const LinearGradient( borderGradient: const LinearGradient(
begin: AlignmentDirectional.topStart, begin: AlignmentDirectional.topStart,

2
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) { Widget build(BuildContext context) {
return MyContainer( return MyContainer(
onTap: onTap, onTap: onTap,
height: 48.h,
height: 48,
width: context.widthScreen, width: context.widthScreen,
borderRadius: const BorderRadius.all(Radius.circular(12)), borderRadius: const BorderRadius.all(Radius.circular(12)),
borderColor: const Color(0XFF8C9FAC), borderColor: const Color(0XFF8C9FAC),

2
lib/features/battle_league/presentation/ui/first_part/widgets/button/battle_purple_button.dart

@ -14,7 +14,7 @@ class BattlePurpleButton extends StatelessWidget {
return MyContainer( return MyContainer(
onTap: onTap, onTap: onTap,
width: context.widthScreen, width: context.widthScreen,
height: 64.h,
height: 64,
borderRadius: const BorderRadius.all(Radius.circular(20)), borderRadius: const BorderRadius.all(Radius.circular(20)),
borderGradient: LinearGradient( borderGradient: LinearGradient(
begin: AlignmentDirectional.topStart, begin: AlignmentDirectional.topStart,

3
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_colors.dart';
import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
import 'package:shia_game_flutter/core/utils/gap.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/image/my_image.dart';
class FoundedAvatar extends StatelessWidget { 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)), Text('Jack William', style: Lexend.bold.copyWith(fontSize: 16)),
Row( Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,

11
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_assets.dart';
import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
import 'package:shia_game_flutter/core/utils/gap.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/image/my_image.dart';
class MyRankingWidget extends StatelessWidget { class MyRankingWidget extends StatelessWidget {
@ -11,22 +10,22 @@ class MyRankingWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SizedBox( return SizedBox(
height: 48.h,
height: 48,
child: Row( child: Row(
children: [ children: [
Text('1', style: Lexend.extraBold.copyWith(fontSize: 12)), Text('1', style: Lexend.extraBold.copyWith(fontSize: 12)),
20.w.gapWidth,
20.0.gapWidth,
const MyImage(asset: MyAssets.sampleAvatar, size: 20), const MyImage(asset: MyAssets.sampleAvatar, size: 20),
6.w.gapWidth,
6.0.gapWidth,
Expanded( Expanded(
child: Text( child: Text(
'Amirreza', 'Amirreza',
style: Lexend.medium.copyWith(fontSize: 12), style: Lexend.medium.copyWith(fontSize: 12),
), ),
), ),
6.w.gapWidth,
6.0.gapWidth,
const MyImage(asset: MyAssets.iconRank), const MyImage(asset: MyAssets.iconRank),
6.w.gapWidth,
6.0.gapWidth,
Text('1234', style: Lexend.black.copyWith(fontSize: 12)), Text('1234', style: Lexend.black.copyWith(fontSize: 12)),
], ],
), ),

5
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/resources/my_text_style.dart';
import 'package:shia_game_flutter/common_ui/theme/my_theme.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/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/container/my_container.dart';
class RankingTime extends StatelessWidget { class RankingTime extends StatelessWidget {
@ -25,7 +24,7 @@ class RankingTime extends StatelessWidget {
fontSize: 14, fontSize: 14,
), ),
), ),
8.w.gapWidth,
8.0.gapWidth,
Text( Text(
'(May 2024)', '(May 2024)',
style: Lexend.medium.copyWith( style: Lexend.medium.copyWith(
@ -44,7 +43,7 @@ class RankingTime extends StatelessWidget {
size: 18, size: 18,
), ),
), ),
10.w.gapWidth,
10.0.gapWidth,
MyContainer( MyContainer(
height: 32, height: 32,
width: 32, width: 32,

15
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_colors.dart';
import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
import 'package:shia_game_flutter/core/utils/gap.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/image/my_image.dart';
class RankingWidget extends StatelessWidget { class RankingWidget extends StatelessWidget {
@ -12,29 +11,29 @@ class RankingWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
height: 48.h,
height: 48,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: const BorderRadius.all(Radius.circular(10)), borderRadius: const BorderRadius.all(Radius.circular(10)),
color: MyColors.black.withValues(alpha: 0.2), color: MyColors.black.withValues(alpha: 0.2),
), ),
child: Row( child: Row(
children: [ children: [
10.w.gapWidth,
10.0.gapWidth,
Text('1', style: Lexend.extraBold.copyWith(fontSize: 12)), Text('1', style: Lexend.extraBold.copyWith(fontSize: 12)),
20.w.gapWidth,
20.0.gapWidth,
const MyImage(asset: MyAssets.sampleAvatar, size: 20), const MyImage(asset: MyAssets.sampleAvatar, size: 20),
6.w.gapWidth,
6.0.gapWidth,
Expanded( Expanded(
child: Text( child: Text(
'Amirreza', 'Amirreza',
style: Lexend.medium.copyWith(fontSize: 12), style: Lexend.medium.copyWith(fontSize: 12),
), ),
), ),
6.w.gapWidth,
6.0.gapWidth,
const MyImage(asset: MyAssets.iconRank), const MyImage(asset: MyAssets.iconRank),
6.w.gapWidth,
6.0.gapWidth,
Text('1234', style: Lexend.black.copyWith(fontSize: 12)), Text('1234', style: Lexend.black.copyWith(fontSize: 12)),
30.w.gapWidth,
30.0.gapWidth,
], ],
), ),
); );

7
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:flutter/material.dart';
import 'package:shia_game_flutter/core/utils/gap.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/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/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/my_ranking_widget.dart';
import 'package:shia_game_flutter/features/battle_league/presentation/ui/first_part/widgets/main_page/ranking_region.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<RegionalRanking> {
), ),
), ),
), ),
22.h.gapHeight,
22.0.gapHeight,
const RankingRegion(), const RankingRegion(),
12.h.gapHeight,
12.0.gapHeight,
Expanded( Expanded(
child: RankingScrollbar( child: RankingScrollbar(
scrollController: scrollController, scrollController: scrollController,
@ -77,7 +76,7 @@ class _RegionalRankingState extends State<RegionalRanking> {
itemCount: 10, itemCount: 10,
padding: const EdgeInsetsDirectional.only(end: 14), padding: const EdgeInsetsDirectional.only(end: 14),
itemBuilder: (context, index) => const RankingWidget(), itemBuilder: (context, index) => const RankingWidget(),
separatorBuilder: (context, index) => 10.h.gapHeight,
separatorBuilder: (context, index) => 10.0.gapHeight,
), ),
), ),
), ),

7
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:flutter/material.dart';
import 'package:shia_game_flutter/core/utils/gap.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/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/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/my_ranking_widget.dart';
import 'package:shia_game_flutter/features/battle_league/presentation/ui/first_part/widgets/main_page/ranking_scrollbar.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<TimeRanking> {
), ),
), ),
), ),
22.h.gapHeight,
22.0.gapHeight,
if(selectedIndex != 0) ...{ if(selectedIndex != 0) ...{
RankingTime( RankingTime(
filterTitles: filterTitles, filterTitles: filterTitles,
selectedIndex: selectedIndex, selectedIndex: selectedIndex,
), ),
12.h.gapHeight,
12.0.gapHeight,
}, },
Expanded( Expanded(
child: RankingScrollbar( child: RankingScrollbar(
@ -83,7 +82,7 @@ class _TimeRankingState extends State<TimeRanking> {
itemCount: 10, itemCount: 10,
padding: const EdgeInsetsDirectional.only(end: 14), padding: const EdgeInsetsDirectional.only(end: 14),
itemBuilder: (context, index) => const RankingWidget(), itemBuilder: (context, index) => const RankingWidget(),
separatorBuilder: (context, index) => 10.h.gapHeight,
separatorBuilder: (context, index) => 10.0.gapHeight,
), ),
), ),
), ),

6
lib/features/battle_league/presentation/ui/first_part/widgets/rank_title.dart

@ -12,7 +12,7 @@ class RankTitle extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
height: 42.h,
height: 42,
width: context.widthScreen, width: context.widthScreen,
alignment: Alignment.center, alignment: Alignment.center,
padding: const EdgeInsets.symmetric(horizontal: 17), 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), const MyImage(asset: MyAssets.iconRank),
4.w.gapWidth,
4.0.gapWidth,
Text('265', style: Lexend.bold.copyWith(fontSize: 12)), Text('265', style: Lexend.bold.copyWith(fontSize: 12)),
], ],
), ),

5
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:flutter/material.dart';
import 'package:shia_game_flutter/common_ui/resources/my_colors.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/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/container/my_container.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.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'; import 'package:shia_game_flutter/features/battle_league/domain/entity/topics_entity.dart';
@ -24,8 +23,8 @@ class TopicWidget extends StatelessWidget {
onTap: () { onTap: () {
onPressed?.call(topic); onPressed?.call(topic);
}, },
height: 48.h,
width: 148.w,
height: 48,
width: 148,
borderRadius: const BorderRadius.all(Radius.circular(12)), borderRadius: const BorderRadius.all(Radius.circular(12)),
borderGradient: !selected ? null : LinearGradient( borderGradient: !selected ? null : LinearGradient(
begin: AlignmentDirectional.centerStart, begin: AlignmentDirectional.centerStart,

2
lib/features/battle_league/presentation/ui/second_part/battle_league_result_page.dart

@ -42,7 +42,7 @@ class BattleLeagueResultPage extends GetView<BattleLeagueController> {
style: Lexend.black, style: Lexend.black,
), ),
), ),
Spacer(),
const Spacer(),
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 16), padding: const EdgeInsets.symmetric(horizontal: 16),
child: BattlePurpleButton( child: BattlePurpleButton(

3
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_assets.dart';
import 'package:shia_game_flutter/common_ui/resources/my_colors.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/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/image/my_image.dart';
class BattleLeagueQuestionAvatar extends StatelessWidget { class BattleLeagueQuestionAvatar extends StatelessWidget {
@ -14,7 +13,7 @@ class BattleLeagueQuestionAvatar extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Column( return Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
spacing: 12.h,
spacing: 12,
children: [ children: [
Stack( Stack(
alignment: Alignment.center, alignment: Alignment.center,

3
lib/features/battle_league/presentation/ui/second_part/widgets/question_board.dart

@ -1,6 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
import 'package:shia_game_flutter/core/utils/screen_size.dart';
import 'package:shia_game_flutter/features/battle_league/presentation/ui/second_part/widgets/battle_league_question_avatar.dart'; import 'package:shia_game_flutter/features/battle_league/presentation/ui/second_part/widgets/battle_league_question_avatar.dart';
class QuestionBoard extends StatelessWidget { class QuestionBoard extends StatelessWidget {
@ -20,7 +19,7 @@ class QuestionBoard extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Padding( return Padding(
padding: EdgeInsets.symmetric(horizontal: 30.w),
padding: const EdgeInsets.symmetric(horizontal: 30),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [

7
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:flutter/material.dart';
import 'package:shia_game_flutter/common_ui/resources/my_assets.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/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/image/my_image.dart';
import 'package:shia_game_flutter/core/widgets/text/gradient_text.dart'; import 'package:shia_game_flutter/core/widgets/text/gradient_text.dart';
@ -11,15 +10,15 @@ class QuestionTimerReadyWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Column( return Column(
spacing: 12.h,
spacing: 12,
children: [ children: [
Stack( Stack(
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
const MyImage(asset: MyAssets.timer), const MyImage(asset: MyAssets.timer),
Positioned( Positioned(
left: 28.w,
top: 26.h,
left: 28,
top: 26,
child: Text( child: Text(
'5', '5',
style: Lexend.extraBold.copyWith( style: Lexend.extraBold.copyWith(

7
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/common_ui/resources/my_assets.dart';
import 'package:shia_game_flutter/core/utils/gap.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/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/background/my_background.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
import 'package:shia_game_flutter/features/home/presentation/controller/home_controller.dart'; import 'package:shia_game_flutter/features/home/presentation/controller/home_controller.dart';
@ -22,12 +21,12 @@ class HomePage extends GetView<HomeController> {
child: Column( child: Column(
children: [ children: [
_image(), _image(),
40.h.gapHeight,
40.0.gapHeight,
const HomeMembership(), const HomeMembership(),
_homeBattleLeague(), _homeBattleLeague(),
20.h.gapHeight,
20.0.gapHeight,
_customWidgets(context), _customWidgets(context),
20.h.gapHeight,
20.0.gapHeight,
const HomeBattleCast(), const HomeBattleCast(),
], ],
), ),

5
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/common_ui/resources/my_text_style.dart';
import 'package:shia_game_flutter/core/utils/gap.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/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/container/my_container.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
import 'package:shia_game_flutter/core/widgets/text/gradient_text.dart'; import 'package:shia_game_flutter/core/widgets/text/gradient_text.dart';
@ -21,7 +20,7 @@ class HomeBattleCast extends StatelessWidget {
clipBehavior: Clip.none, clipBehavior: Clip.none,
children: [ children: [
MyContainer( MyContainer(
height: 120.h,
height: 120,
borderRadius: const BorderRadius.all(Radius.circular(20)), borderRadius: const BorderRadius.all(Radius.circular(20)),
borderGradient: const LinearGradient( borderGradient: const LinearGradient(
begin: AlignmentDirectional.topCenter, begin: AlignmentDirectional.topCenter,
@ -54,7 +53,7 @@ class HomeBattleCast extends StatelessWidget {
shadowColor: const Color(0xFF3C38C4), shadowColor: const Color(0xFF3C38C4),
fontSize: 22, fontSize: 22,
), ),
10.h.gapHeight,
10.0.gapHeight,
Container( Container(
padding: const EdgeInsets.all(5), padding: const EdgeInsets.all(5),
decoration: BoxDecoration( decoration: BoxDecoration(

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

@ -21,7 +21,7 @@ class HomeBattleLeague extends StatelessWidget {
MyContainer( MyContainer(
onTap: onTap, onTap: onTap,
width: context.widthScreen, width: context.widthScreen,
height: 120.h,
height: 120,
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 12, horizontal: 12,
vertical: 16, vertical: 16,

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

@ -23,7 +23,7 @@ class HomeCustomWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MyContainer( return MyContainer(
height: 130.h,
height: 130,
borderRadius: const 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],
@ -45,7 +45,7 @@ class HomeCustomWidget extends StatelessWidget {
), ),
const Spacer(), const Spacer(),
CustomWidgetType.title[type] ?? const SizedBox.shrink(), CustomWidgetType.title[type] ?? const SizedBox.shrink(),
10.h.gapHeight,
10.0.gapHeight,
Container( Container(
padding: const EdgeInsets.all(5), padding: const EdgeInsets.all(5),
width: context.widthScreen, width: context.widthScreen,

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

@ -38,7 +38,7 @@ class HomeMembership extends StatelessWidget {
child: Row( child: Row(
children: [ children: [
const MyImage(asset: MyAssets.iconCrown, size: 24), const MyImage(asset: MyAssets.iconCrown, size: 24),
8.w.gapWidth,
8.0.gapWidth,
Text( Text(
context.translate.pro_membership, context.translate.pro_membership,
style: Lexend.semiBold.copyWith( style: Lexend.semiBold.copyWith(
@ -48,7 +48,7 @@ class HomeMembership extends StatelessWidget {
), ),
const Spacer(), const Spacer(),
const MyImage(asset: MyAssets.iconClock), const MyImage(asset: MyAssets.iconClock),
6.w.gapWidth,
6.0.gapWidth,
Text('125d 4h', style: Lexend.semiBold.copyWith(fontSize: 12)), Text('125d 4h', style: Lexend.semiBold.copyWith(fontSize: 12)),
], ],
), ),

5
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/common_ui/resources/my_text_style.dart';
import 'package:shia_game_flutter/core/status/base_status.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/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/container/my_container.dart';
import 'package:shia_game_flutter/core/widgets/input/my_input.dart'; import 'package:shia_game_flutter/core/widgets/input/my_input.dart';
import 'package:shia_game_flutter/core/widgets/text/gradient_text.dart'; import 'package:shia_game_flutter/core/widgets/text/gradient_text.dart';
@ -17,7 +16,7 @@ class UsernameDialog extends GetView<HomeController> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MyContainer( return MyContainer(
padding: const EdgeInsets.only(left: 30, right: 30, bottom: 30, top: 13), 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( borderGradient: const LinearGradient(
begin: Alignment.topCenter, begin: Alignment.topCenter,
end: Alignment.bottomCenter, end: Alignment.bottomCenter,
@ -51,7 +50,7 @@ class UsernameDialog extends GetView<HomeController> {
Obx( Obx(
() => MyContainer( () => MyContainer(
onTap: controller.loginGuest, onTap: controller.loginGuest,
height: 41.h,
height: 41,
loading: controller.loginGuestStatus.value is BaseLoading, loading: controller.loginGuestStatus.value is BaseLoading,
borderRadius: const BorderRadius.all(Radius.circular(12)), borderRadius: const BorderRadius.all(Radius.circular(12)),
gradient: const RadialGradient( gradient: const RadialGradient(

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

@ -34,53 +34,53 @@ 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: [
const MyImage(asset: MyAssets.shiaMind),
MyImage(asset: MyAssets.shiaMind),
PositionedDirectional( PositionedDirectional(
top: -124.h,
end: -62.w,
child: const MyImage(asset: MyAssets.question),
top: -124,
end: -62,
child: MyImage(asset: MyAssets.question),
), ),
PositionedDirectional( 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( 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( PositionedDirectional(
bottom: -90.h,
start: -30.w,
child: const MyImage(asset: MyAssets.question),
bottom: -90,
start: -30,
child: MyImage(asset: MyAssets.question),
), ),
PositionedDirectional( 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( 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( 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) { Positioned _bottomLoading(BuildContext context) {
return Positioned(
bottom: 16.h,
child: const MyLinearLoading()
return const Positioned(
bottom: 16,
child: MyLinearLoading()
); );
} }
} }

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

@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:shia_game_flutter/core/utils/gap.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/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/background/my_background.dart';
import 'package:shia_game_flutter/core/widgets/button/my_gradient_button.dart'; import 'package:shia_game_flutter/core/widgets/button/my_gradient_button.dart';
import 'package:shia_game_flutter/core/widgets/input/my_input.dart'; import 'package:shia_game_flutter/core/widgets/input/my_input.dart';
@ -22,11 +21,11 @@ class ProfilePage extends GetView<ProfileController> {
children: [ children: [
const ProfileAvatar(), const ProfileAvatar(),
_changeProfileBtn(context), _changeProfileBtn(context),
40.h.gapHeight,
40.0.gapHeight,
_userNameInput(context), _userNameInput(context),
28.h.gapHeight,
28.0.gapHeight,
_locationInput(context), _locationInput(context),
150.h.gapHeight,
150.0.gapHeight,
_bottomButtons(), _bottomButtons(),
], ],
), ),

3
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/resources/my_text_style.dart';
import 'package:shia_game_flutter/common_ui/theme/my_theme.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/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/container/my_container.dart';
class ProfileDeleteAccount extends StatelessWidget { class ProfileDeleteAccount extends StatelessWidget {
@ -11,7 +10,7 @@ class ProfileDeleteAccount extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MyContainer( return MyContainer(
height: 58.h,
height: 58,
onTap: () {}, onTap: () {},
borderRadius: const BorderRadius.all(Radius.circular(12)), borderRadius: const BorderRadius.all(Radius.circular(12)),
color: context.backgroundColor, color: context.backgroundColor,

3
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_assets.dart';
import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart'; import 'package:shia_game_flutter/common_ui/resources/my_text_style.dart';
import 'package:shia_game_flutter/core/utils/my_localization.dart'; import 'package:shia_game_flutter/core/utils/my_localization.dart';
import 'package:shia_game_flutter/core/utils/screen_size.dart';
import 'package:shia_game_flutter/core/widgets/container/my_container.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/image/my_image.dart';
@ -12,7 +11,7 @@ class ProfileLogout extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MyContainer( return MyContainer(
height: 58.h,
height: 58,
onTap: () {}, onTap: () {},
borderRadius: const BorderRadius.all(Radius.circular(12)), borderRadius: const BorderRadius.all(Radius.circular(12)),
color: const Color(0XFF270A59), color: const Color(0XFF270A59),

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

@ -1,7 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:shia_game_flutter/core/utils/gap.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/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/controller/shop_controller.dart';
import 'package:shia_game_flutter/features/shop/presentation/ui/widgets/shop_package_entity.dart'; import 'package:shia_game_flutter/features/shop/presentation/ui/widgets/shop_package_entity.dart';
@ -19,7 +18,7 @@ class ShopPage extends GetView<ShopController> {
itemBuilder: (context, index) => ShopPackageWidget( itemBuilder: (context, index) => ShopPackageWidget(
shopPackage: controller.shopList[index], shopPackage: controller.shopList[index],
), ),
separatorBuilder: (context, index) => 20.h.gapHeight,
separatorBuilder: (context, index) => 20.0.gapHeight,
), ),
), ),
); );

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

@ -1,5 +1,4 @@
import 'package:flutter/material.dart'; 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/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/domain/entity/shop_entity.dart';
import 'package:shia_game_flutter/features/shop/presentation/ui/widgets/shop_item/styles/book_style.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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MyContainer( 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), color: const Color(0XFF1B0B38),
borderColor: const Color(0XFF462A79), borderColor: const Color(0XFF462A79),
borderRadius: const BorderRadius.all(Radius.circular(14)), borderRadius: const BorderRadius.all(Radius.circular(14)),

5
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/common_ui/theme/my_theme.dart';
import 'package:shia_game_flutter/core/utils/gap.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/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/button/my_gradient_button.dart';
import 'package:shia_game_flutter/core/widgets/image/my_image.dart'; import 'package:shia_game_flutter/core/widgets/image/my_image.dart';
import 'package:shia_game_flutter/features/shop/domain/entity/shop_entity.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( SizedBox(
width: 110, width: 110,
child: Text( child: Text(
@ -45,7 +44,7 @@ class BookStyle extends StatelessWidget {
), ),
), ),
), ),
18.h.gapHeight,
18.0.gapHeight,
MyGradientButton( MyGradientButton(
onTap: () {}, onTap: () {},
title: context.translate.select, title: context.translate.select,

3
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/common_ui/resources/my_colors.dart';
import 'package:shia_game_flutter/core/utils/my_localization.dart'; import 'package:shia_game_flutter/core/utils/my_localization.dart';
import 'package:shia_game_flutter/core/utils/number_format.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/enum/my_button_type.dart';
import 'package:shia_game_flutter/core/widgets/button/my_gradient_button.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/core/widgets/image/my_image.dart';
@ -21,7 +20,7 @@ class CharacterStyle extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: AnimatedContainer( child: AnimatedContainer(
width: 120.w,
width: 120,
duration: const Duration(milliseconds: 200), duration: const Duration(milliseconds: 200),
decoration: BoxDecoration( decoration: BoxDecoration(
border:Border.all(width: 2, color: const Color(0xFFB37EFA)), border:Border.all(width: 2, color: const Color(0xFFB37EFA)),

2
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( Wrap(
direction: Axis.horizontal, direction: Axis.horizontal,
spacing: 7, spacing: 7,

Loading…
Cancel
Save