Update DefaultNavBar widget and ServerFailure class

Refactor DefaultNavBar widget to update page index on item tap.
Update ServerFailure class to handle 400 status code with list of errors.
This commit is contained in:
Mohammad Salameh
2024-04-04 15:51:41 +03:00
parent a0c553f9ae
commit 8c80283f9c
2 changed files with 13 additions and 4 deletions
@@ -27,9 +27,11 @@ class DefaultNavBar extends StatelessWidget {
// DevicesCubit.getInstance()
// .clearCategoriesSelection(context);
// }
if (HomeCubit.getInstance().selectedRoom != null) {
HomeCubit.getInstance().unselectRoom();
}
// if (HomeCubit.getInstance().selectedRoom != null) {
// HomeCubit.getInstance().unselectRoom();
// }
HomeCubit.getInstance().updatePageIndex(index);
},
currentIndex: HomeCubit.pageIndex,
selectedItemColor: ColorsManager.primaryColor,