Modified Devices Pages

This commit is contained in:
Mohammad Salameh
2024-03-11 12:04:26 +03:00
parent f11b6d8d32
commit d3bd10730c
16 changed files with 136 additions and 131 deletions

View File

@ -26,9 +26,7 @@ class AppBody extends StatelessWidget {
),
),
child: PageView(
onPageChanged: (int index) {
NavCubit.of(context).updatePageIndex(index);
},
physics: const NeverScrollableScrollPhysics(),
controller: NavCubit.of(context).pageController,
children: NavCubit.of(context).pages,
)

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:syncrow_app/features/app_layout/bloc/nav_cubit.dart';
import 'package:syncrow_app/features/app_layout/bloc/spaces_cubit.dart';
import 'package:syncrow_app/features/devices/bloc/devices_cubit.dart';
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
import 'package:syncrow_app/utils/resource_manager/constants.dart';
@ -24,6 +25,9 @@ class DefaultNavBar extends StatelessWidget {
if (DevicesCubit.get(context).chosenCategoryView != null) {
DevicesCubit().clearCategoriesSelection(context);
}
if (SpacesCubit.get(context).selectedRoom != null) {
SpacesCubit.get(context).unselectRoom();
}
},
currentIndex: NavCubit.pageIndex,
selectedItemColor: ColorsManager.primaryColor,