mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-27 23:14:55 +00:00
Fixed conditional rendering logic for app bar in AppLayout widget
Update the condition to check for the presence of spaces in HomeCubit instance before displaying the DefaultAppBar component. This improves readability and maintainability of the code.
This commit is contained in:
@ -41,8 +41,9 @@ class AppLayout extends StatelessWidget {
|
||||
backgroundColor: ColorsManager.backgroundColor,
|
||||
extendBodyBehindAppBar: true,
|
||||
extendBody: true,
|
||||
appBar:
|
||||
state is GetSpacesLoaded ? const DefaultAppBar() : null,
|
||||
appBar: HomeCubit.getInstance().spaces != null
|
||||
? const DefaultAppBar()
|
||||
: null,
|
||||
body: const AppBody(),
|
||||
bottomNavigationBar: const DefaultNavBar(),
|
||||
// floatingActionButton: FloatingActionButton(
|
||||
|
||||
Reference in New Issue
Block a user