Skip to content

Commit 763eccd

Browse files
TF-3603 Hide settings appbar if is inside Cozy dashboard
1 parent 6650385 commit 763eccd

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

lib/features/manage_account/presentation/manage_account_dashboard_view.dart

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'package:core/presentation/extensions/color_extension.dart';
22
import 'package:core/presentation/utils/responsive_utils.dart';
33
import 'package:core/presentation/views/responsive/responsive_widget.dart';
4+
import 'package:cozy/cozy_config_manager/cozy_config_manager.dart';
45
import 'package:flutter/material.dart';
56
import 'package:flutter_portal/flutter_portal.dart';
67
import 'package:get/get.dart';
@@ -38,19 +39,26 @@ class ManageAccountDashBoardView extends GetWidget<ManageAccountDashBoardControl
3839
child: ResponsiveWidget(
3940
responsiveUtils: controller.responsiveUtils,
4041
desktop: Column(children: [
41-
Obx(() => NavigationBarWidget(
42-
imagePaths: controller.imagePaths,
43-
accountId: controller.accountId.value,
44-
ownEmailAddress: controller.getOwnEmailAddress(),
45-
onTapApplicationLogoAction: () =>
46-
controller.backToMailboxDashBoard(context: context),
42+
FutureBuilder(
43+
future: CozyConfigManager().isInsideCozy,
44+
builder: (context, snapshot) {
45+
if (snapshot.data == true) return const SizedBox.shrink();
46+
47+
return Obx(() => NavigationBarWidget(
48+
imagePaths: controller.imagePaths,
49+
accountId: controller.accountId.value,
50+
ownEmailAddress: controller.getOwnEmailAddress(),
51+
onTapApplicationLogoAction: () =>
52+
controller.backToMailboxDashBoard(context: context),
4753
settingActionTypes: const [ProfileSettingActionType.signOut],
48-
onProfileSettingActionTypeClick: (actionType) =>
49-
controller.handleProfileSettingActionTypeClick(
54+
onProfileSettingActionTypeClick: (actionType) =>
55+
controller.handleProfileSettingActionTypeClick(
5056
context: context,
5157
actionType: actionType,
5258
),
53-
)),
59+
));
60+
}
61+
),
5462
Expanded(child: Row(
5563
crossAxisAlignment: CrossAxisAlignment.start,
5664
children: [

0 commit comments

Comments
 (0)