TF-3603 Hide settings appbar if is inside Cozy dashboard

This commit is contained in:
DatDang
2025-04-24 09:17:53 +07:00
committed by Dat H. Pham
parent d62e2861cf
commit 787b9fadd3
@@ -1,6 +1,7 @@
import 'package:core/presentation/extensions/color_extension.dart'; import 'package:core/presentation/extensions/color_extension.dart';
import 'package:core/presentation/utils/responsive_utils.dart'; import 'package:core/presentation/utils/responsive_utils.dart';
import 'package:core/presentation/views/responsive/responsive_widget.dart'; import 'package:core/presentation/views/responsive/responsive_widget.dart';
import 'package:cozy/cozy_config_manager/cozy_config_manager.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_portal/flutter_portal.dart'; import 'package:flutter_portal/flutter_portal.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
@@ -38,7 +39,12 @@ class ManageAccountDashBoardView extends GetWidget<ManageAccountDashBoardControl
child: ResponsiveWidget( child: ResponsiveWidget(
responsiveUtils: controller.responsiveUtils, responsiveUtils: controller.responsiveUtils,
desktop: Column(children: [ desktop: Column(children: [
Obx(() => NavigationBarWidget( FutureBuilder(
future: CozyConfigManager().isInsideCozy,
builder: (context, snapshot) {
if (snapshot.data == true) return const SizedBox.shrink();
return Obx(() => NavigationBarWidget(
imagePaths: controller.imagePaths, imagePaths: controller.imagePaths,
accountId: controller.accountId.value, accountId: controller.accountId.value,
ownEmailAddress: controller.getOwnEmailAddress(), ownEmailAddress: controller.getOwnEmailAddress(),
@@ -50,7 +56,9 @@ class ManageAccountDashBoardView extends GetWidget<ManageAccountDashBoardControl
context: context, context: context,
actionType: actionType, actionType: actionType,
), ),
)), ));
}
),
Expanded(child: Row( Expanded(child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [