mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-23 10:37:56 +00:00
Fixed logout issue
This commit is contained in:
@@ -8,7 +8,6 @@ import 'package:syncrow_app/features/devices/bloc/devices_cubit.dart';
|
||||
import 'package:syncrow_app/features/devices/model/device_model.dart';
|
||||
import 'package:syncrow_app/features/devices/model/room_model.dart';
|
||||
import 'package:syncrow_app/features/devices/model/status_model.dart';
|
||||
import 'package:syncrow_app/features/devices/view/widgets/curtains/blind_view.dart';
|
||||
import 'package:syncrow_app/features/devices/view/widgets/curtains/curtain_view.dart';
|
||||
import 'package:syncrow_app/features/devices/view/widgets/devices_view_body.dart';
|
||||
import 'package:syncrow_app/features/menu/view/menu_view.dart';
|
||||
@@ -52,6 +51,7 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
_instance = null;
|
||||
selectedSpace = null;
|
||||
selectedRoom = null;
|
||||
pageIndex = 0;
|
||||
return super.close();
|
||||
}
|
||||
|
||||
@@ -172,8 +172,7 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
size: 25,
|
||||
),
|
||||
style: ButtonStyle(
|
||||
foregroundColor:
|
||||
MaterialStateProperty.all(ColorsManager.textPrimaryColor),
|
||||
foregroundColor: MaterialStateProperty.all(ColorsManager.textPrimaryColor),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.push(
|
||||
@@ -198,8 +197,7 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
size: 25,
|
||||
),
|
||||
style: ButtonStyle(
|
||||
foregroundColor:
|
||||
MaterialStateProperty.all(ColorsManager.textPrimaryColor),
|
||||
foregroundColor: MaterialStateProperty.all(ColorsManager.textPrimaryColor),
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
@@ -209,8 +207,7 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
size: 25,
|
||||
),
|
||||
style: ButtonStyle(
|
||||
foregroundColor:
|
||||
MaterialStateProperty.all(ColorsManager.textPrimaryColor),
|
||||
foregroundColor: MaterialStateProperty.all(ColorsManager.textPrimaryColor),
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
@@ -230,8 +227,7 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
size: 25,
|
||||
),
|
||||
style: ButtonStyle(
|
||||
foregroundColor:
|
||||
MaterialStateProperty.all(ColorsManager.textPrimaryColor),
|
||||
foregroundColor: MaterialStateProperty.all(ColorsManager.textPrimaryColor),
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
@@ -241,8 +237,7 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
size: 25,
|
||||
),
|
||||
style: ButtonStyle(
|
||||
foregroundColor:
|
||||
MaterialStateProperty.all(ColorsManager.textPrimaryColor),
|
||||
foregroundColor: MaterialStateProperty.all(ColorsManager.textPrimaryColor),
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
@@ -275,8 +270,7 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
};
|
||||
|
||||
static var bottomNavItems = [
|
||||
defaultBottomNavBarItem(
|
||||
icon: Assets.assetsIconsDashboard, label: 'Dashboard'),
|
||||
defaultBottomNavBarItem(icon: Assets.assetsIconsDashboard, label: 'Dashboard'),
|
||||
// defaultBottomNavBarItem(icon: Assets.assetsIconslayout, label: 'Layout'),
|
||||
defaultBottomNavBarItem(icon: Assets.assetsIconsDevices, label: 'Devices'),
|
||||
defaultBottomNavBarItem(icon: Assets.assetsIconsRoutines, label: 'Routine'),
|
||||
@@ -301,8 +295,7 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
}
|
||||
}
|
||||
|
||||
BottomNavigationBarItem defaultBottomNavBarItem(
|
||||
{required String icon, required String label}) {
|
||||
BottomNavigationBarItem defaultBottomNavBarItem({required String icon, required String label}) {
|
||||
return BottomNavigationBarItem(
|
||||
icon: SvgPicture.asset(icon),
|
||||
activeIcon: SvgPicture.asset(
|
||||
|
||||
@@ -17,9 +17,7 @@ class AppLayout extends StatelessWidget {
|
||||
child: BlocBuilder<HomeCubit, HomeState>(
|
||||
builder: (context, state) {
|
||||
return DefaultScaffold(
|
||||
appBar: HomeCubit.getInstance().spaces != null
|
||||
? const DefaultAppBar()
|
||||
: null,
|
||||
appBar: HomeCubit.getInstance().spaces != null ? const DefaultAppBar() : null,
|
||||
bottomNavBar: const DefaultNavBar(),
|
||||
child: const AppBody(),
|
||||
);
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
|
||||
import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart';
|
||||
|
||||
|
||||
class AppBody extends StatelessWidget {
|
||||
const AppBody({
|
||||
super.key,
|
||||
|
||||
Reference in New Issue
Block a user