mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00
Modified Devices Pages
This commit is contained in:
@ -33,14 +33,14 @@ class NavCubit extends Cubit<NavState> {
|
||||
),
|
||||
],
|
||||
'Devices': [
|
||||
IconButton(
|
||||
icon: Image.asset(
|
||||
Assets.iconsFilter,
|
||||
height: 20,
|
||||
width: 20,
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
// IconButton(
|
||||
// icon: Image.asset(
|
||||
// Assets.iconsFilter,
|
||||
// height: 20,
|
||||
// width: 20,
|
||||
// ),
|
||||
// onPressed: () {},
|
||||
// ),
|
||||
IconButton(
|
||||
icon: const Icon(
|
||||
Icons.add,
|
||||
@ -65,14 +65,14 @@ class NavCubit extends Cubit<NavState> {
|
||||
),
|
||||
],
|
||||
'Routine': [
|
||||
IconButton(
|
||||
icon: Image.asset(
|
||||
Assets.iconsFilter,
|
||||
height: 20,
|
||||
width: 20,
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
// IconButton(
|
||||
// icon: Image.asset(
|
||||
// Assets.iconsFilter,
|
||||
// height: 20,
|
||||
// width: 20,
|
||||
// ),
|
||||
// onPressed: () {},
|
||||
// ),
|
||||
IconButton(
|
||||
icon: const Icon(
|
||||
Icons.add,
|
||||
@ -98,16 +98,8 @@ class NavCubit extends Cubit<NavState> {
|
||||
],
|
||||
'Menu': [
|
||||
IconButton(
|
||||
icon: Image.asset(
|
||||
Assets.iconsQrScan,
|
||||
height: 20,
|
||||
width: 20,
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
IconButton(
|
||||
icon: Image.asset(
|
||||
Assets.iconsSettings,
|
||||
icon: SvgPicture.asset(
|
||||
Assets.iconsScan,
|
||||
height: 20,
|
||||
width: 20,
|
||||
),
|
||||
@ -151,6 +143,7 @@ class NavCubit extends Cubit<NavState> {
|
||||
|
||||
void updatePageIndex(int index) {
|
||||
pageIndex = index;
|
||||
print('index: $index');
|
||||
pageController.animateToPage(index,
|
||||
duration: const Duration(milliseconds: 150), curve: Curves.easeIn);
|
||||
emit(NavChangePage());
|
||||
|
@ -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,
|
||||
)
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user