switched the safe area to be in the scaffold

This commit is contained in:
Mohammad Salameh
2024-04-29 11:38:35 +03:00
parent a12f006d63
commit 3607b5353d
6 changed files with 86 additions and 120 deletions

View File

@ -3,7 +3,6 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart';
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
import 'package:syncrow_app/utils/resource_manager/constants.dart';
class DefaultNavBar extends StatelessWidget {
const DefaultNavBar({
@ -15,34 +14,23 @@ class DefaultNavBar extends StatelessWidget {
return BlocBuilder<HomeCubit, HomeState>(
builder: (context, state) {
var cubit = HomeCubit.getInstance();
return SizedBox(
height: Constants.bottomNavBarHeight,
child: BottomNavigationBar(
backgroundColor: Colors.transparent,
onTap: (int index) {
cubit.updatePageIndex(index);
// if (DevicesCubit.getInstance().chosenCategoryView != null) {
// DevicesCubit.getInstance()
// .clearCategoriesSelection(context);
// }
// if (HomeCubit.getInstance().selectedRoom != null) {
// HomeCubit.getInstance().unselectRoom();
// }
HomeCubit.getInstance().updatePageIndex(index);
},
currentIndex: HomeCubit.pageIndex,
selectedItemColor: ColorsManager.primaryColor,
selectedLabelStyle: const TextStyle(
color: ColorsManager.primaryColor,
fontSize: 10,
),
showUnselectedLabels: true,
unselectedItemColor: Colors.grey,
type: BottomNavigationBarType.fixed,
elevation: 0,
items: HomeCubit.bottomNavItems,
return BottomNavigationBar(
backgroundColor: Colors.transparent,
onTap: (int index) {
cubit.updatePageIndex(index);
HomeCubit.getInstance().updatePageIndex(index);
},
currentIndex: HomeCubit.pageIndex,
selectedItemColor: ColorsManager.primaryColor,
selectedLabelStyle: const TextStyle(
color: ColorsManager.primaryColor,
fontSize: 10,
),
showUnselectedLabels: true,
unselectedItemColor: Colors.grey,
type: BottomNavigationBarType.fixed,
elevation: 0,
items: HomeCubit.bottomNavItems,
);
},
);