mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-17 02:25:16 +00:00
switched the safe area to be in the scaffold
This commit is contained in:
@ -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,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
Reference in New Issue
Block a user