Browse Source

add: internet permission

pull/20/head
AmirrezaChegini 4 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: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());
}

3
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,

5
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,

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_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,

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/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<MasterController> {
@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,

3
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(

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: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,

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

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

9
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(

6
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(),

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

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

4
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;
}
}

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

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_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<BattleLeagueController> {
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(),
],
),

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

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

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(
onTap: onTap,
width: context.widthScreen,
height: 64.h,
height: 64,
borderRadius: const BorderRadius.all(Radius.circular(20)),
borderGradient: const LinearGradient(
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) {
return MyContainer(
onTap: onTap,
height: 48.h,
height: 48,
width: context.widthScreen,
borderRadius: const BorderRadius.all(Radius.circular(12)),
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(
onTap: onTap,
width: context.widthScreen,
height: 64.h,
height: 64,
borderRadius: const BorderRadius.all(Radius.circular(20)),
borderGradient: LinearGradient(
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_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,

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_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)),
],
),

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/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,

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_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,
],
),
);

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: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<RegionalRanking> {
),
),
),
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<RegionalRanking> {
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,
),
),
),

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: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<TimeRanking> {
),
),
),
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<TimeRanking> {
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,
),
),
),

6
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)),
],
),

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: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,

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,
),
),
Spacer(),
const Spacer(),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
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_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,

3
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: [

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: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(

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

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/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(

2
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,

4
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,

4
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)),
],
),

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/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<HomeController> {
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<HomeController> {
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(

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

@ -34,53 +34,53 @@ class IntroPage extends GetView<IntroController> {
}
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()
);
}
}

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: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<ProfileController> {
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(),
],
),

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/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,

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_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),

3
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<ShopController> {
itemBuilder: (context, index) => ShopPackageWidget(
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: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)),

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/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,

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

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

Loading…
Cancel
Save