mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 17:47:28 +00:00
bug_fixing 2
This commit is contained in:
@ -24,7 +24,7 @@ class AppLayout extends StatelessWidget {
|
||||
create: (context) => DevicesCubit(),
|
||||
),
|
||||
],
|
||||
child: BlocListener<HomeCubit, SpacesState>(
|
||||
child: BlocListener<HomeCubit, HomeState>(
|
||||
listener: (context, state) {
|
||||
if (state is GetSpacesError) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
@ -36,7 +36,7 @@ class AppLayout extends StatelessWidget {
|
||||
.popUntil((route) => route.settings.name == Routes.authLogin);
|
||||
}
|
||||
},
|
||||
child: BlocBuilder<HomeCubit, SpacesState>(
|
||||
child: BlocBuilder<HomeCubit, HomeState>(
|
||||
builder: (context, state) {
|
||||
return AnnotatedRegion(
|
||||
value: SystemUiOverlayStyle(
|
||||
@ -44,21 +44,15 @@ class AppLayout extends StatelessWidget {
|
||||
statusBarIconBrightness: Brightness.light,
|
||||
),
|
||||
child: SafeArea(
|
||||
child: BlocBuilder<HomeCubit, SpacesState>(
|
||||
child: BlocBuilder<HomeCubit, HomeState>(
|
||||
builder: (context, state) {
|
||||
return Scaffold(
|
||||
return const Scaffold(
|
||||
backgroundColor: ColorsManager.backgroundColor,
|
||||
extendBodyBehindAppBar: true,
|
||||
extendBody: true,
|
||||
appBar: state is! GetSpacesLoading ||
|
||||
state is! GetSpaceRoomsLoading
|
||||
? const DefaultAppBar()
|
||||
: null,
|
||||
body: const AppBody(),
|
||||
bottomNavigationBar: state is! GetSpacesLoading ||
|
||||
state is! GetSpaceRoomsLoading
|
||||
? const DefaultNavBar()
|
||||
: null,
|
||||
appBar: DefaultAppBar(),
|
||||
body: AppBody(),
|
||||
bottomNavigationBar: DefaultNavBar(),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
Reference in New Issue
Block a user