From 3765aa25c399d1d5b7571d42ae76c594dde27938 Mon Sep 17 00:00:00 2001 From: AmirrezaChegini Date: Sat, 8 Nov 2025 10:14:45 +0330 Subject: [PATCH] fix: bottom nav bar --- lib/core/widgets/bottom_nav_bar/bottom_nav_bar.dart | 11 ++++------- .../bottom_nav_bar/styles/bottom_nav_bar_item.dart | 7 +++---- .../styles/bottom_nav_bar_profile_item.dart | 11 +++++------ lib/main.dart | 2 +- 4 files changed, 13 insertions(+), 18 deletions(-) diff --git a/lib/core/widgets/bottom_nav_bar/bottom_nav_bar.dart b/lib/core/widgets/bottom_nav_bar/bottom_nav_bar.dart index cde6a64..36d0c04 100644 --- a/lib/core/widgets/bottom_nav_bar/bottom_nav_bar.dart +++ b/lib/core/widgets/bottom_nav_bar/bottom_nav_bar.dart @@ -1,8 +1,8 @@ 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_spaces.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,10 +13,7 @@ class BottomNavBar extends GetView { @override Widget build(BuildContext context) { return Container( - clipBehavior: Clip.none, - padding: const EdgeInsets.symmetric( - horizontal: MySpaces.s30 - ), + padding: EdgeInsets.symmetric(horizontal: 30.w), decoration: const BoxDecoration( gradient: RadialGradient( radius: 2.5, @@ -30,8 +27,8 @@ class BottomNavBar extends GetView { backgroundColor: Colors.transparent, elevation: 0, type: BottomNavigationBarType.fixed, - unselectedFontSize: 8, - selectedFontSize: 8, + unselectedFontSize: 11.sp, + selectedFontSize: 11.sp, unselectedLabelStyle: Lexend.bold, selectedLabelStyle: Lexend.bold, showSelectedLabels: false, diff --git a/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_item.dart b/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_item.dart index 5ffb738..a29dddc 100644 --- a/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_item.dart +++ b/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_item.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:shia_game_flutter/common_ui/resources/my_spaces.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'; import 'package:shia_game_flutter/features/master/domain/entity/bottom_nav_entity.dart'; @@ -13,12 +12,12 @@ class BottomNavBarItem extends StatelessWidget { @override Widget build(BuildContext context) { return Column( + spacing: 4.h, children: [ MyImage(asset: bottomNavEntity.icon ?? ''), - MySpaces.s4.gapHeight, Text( bottomNavEntity.title ?? '', - style: Lexend.bold.copyWith(fontSize: MySpaces.s8), + style: Lexend.bold.copyWith(fontSize: 11.sp), ), ], ); diff --git a/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_profile_item.dart b/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_profile_item.dart index 93545b3..7acb67a 100644 --- a/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_profile_item.dart +++ b/lib/core/widgets/bottom_nav_bar/styles/bottom_nav_bar_profile_item.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:shia_game_flutter/common_ui/resources/my_spaces.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'; import 'package:shia_game_flutter/features/master/domain/entity/bottom_nav_entity.dart'; @@ -13,10 +12,11 @@ class BottomNavBarProfileItem extends StatelessWidget { @override Widget build(BuildContext context) { return Column( + spacing: 4.h, children: [ Container( - height: 26, - width: 26, + height: 26.h, + width: 26.w, padding: const EdgeInsets.all(3), decoration: BoxDecoration( shape: BoxShape.circle, @@ -27,10 +27,9 @@ class BottomNavBarProfileItem extends StatelessWidget { ), child: MyImage(asset: bottomNavEntity.icon ?? ''), ), - MySpaces.s4.gapHeight, Text( bottomNavEntity.title ?? '', - style: Lexend.bold.copyWith(fontSize: MySpaces.s8), + style: Lexend.bold.copyWith(fontSize: 11.sp), ), ], ); diff --git a/lib/main.dart b/lib/main.dart index dedefa7..98bea17 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -31,7 +31,7 @@ class MainApp extends StatelessWidget { fallbackLocale: const Locale('en', 'US'), supportedLocales: const [Locale('en', 'US')], getPages: appPages, - initialRoute: Routes.introPage, + initialRoute: Routes.masterPage, localizationsDelegates: const [ AppLocalizations.delegate, GlobalMaterialLocalizations.delegate,