From eaa66cb133cd903932eec2f49a03df3a1dfa16d1 Mon Sep 17 00:00:00 2001 From: JiWoong Sul Date: Sun, 14 Sep 2025 16:41:33 +0900 Subject: [PATCH] =?UTF-8?q?=EC=82=AC=EC=9D=B4=EB=93=9C=EB=B0=94=20?= =?UTF-8?q?=EB=A9=94=EB=89=B4=20=EC=88=A8=EA=B9=80:=20=EC=9A=B0=ED=8E=B8?= =?UTF-8?q?=EB=B2=88=ED=98=B8=20=EA=B2=80=EC=83=89=C2=B7=EC=9E=AC=EA=B3=A0?= =?UTF-8?q?=20=EC=9D=B4=EB=A0=A5=20=ED=95=AD=EB=AA=A9=20=EB=B9=84=EB=85=B8?= =?UTF-8?q?=EC=B6=9C=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - SidebarMenu에 기능 토글(static const) 추가 - 우편번호 검색(Routes.zipcode), 재고 이력(Routes.inventoryHistory) 메뉴를 조건부 렌더링으로 숨김 - 라우트/코드는 유지하며 메뉴에서만 비노출 --- lib/screens/common/app_layout.dart | 40 +++++++++++++++++------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/lib/screens/common/app_layout.dart b/lib/screens/common/app_layout.dart index b66979b..d6c2819 100644 --- a/lib/screens/common/app_layout.dart +++ b/lib/screens/common/app_layout.dart @@ -1008,6 +1008,10 @@ class SidebarMenu extends StatelessWidget { required this.expiringMaintenanceCount, }); + // Feature visibility toggles for sidebar (hide without removing routes) + static const bool _enableInventoryMenu = false; // 재고관리(재고 이력) 메뉴 숨김 + static const bool _enableZipcodeMenu = false; // 우편번호 검색 메뉴 숨김 + @override Widget build(BuildContext context) { return Column( @@ -1067,16 +1071,17 @@ class SidebarMenu extends StatelessWidget { badge: null, ), - _buildMenuItem( - icon: Icons.history, - title: '재고 이력', - route: Routes.inventoryHistory, - isActive: [ - Routes.inventory, - Routes.inventoryHistory, - ].contains(currentRoute), - badge: null, - ), + if (_enableInventoryMenu) + _buildMenuItem( + icon: Icons.history, + title: '재고 이력', + route: Routes.inventoryHistory, + isActive: [ + Routes.inventory, + Routes.inventoryHistory, + ].contains(currentRoute), + badge: null, + ), _buildMenuItem( icon: Icons.warehouse_outlined, @@ -1086,13 +1091,14 @@ class SidebarMenu extends StatelessWidget { badge: null, ), - _buildMenuItem( - icon: Icons.location_on_outlined, - title: '우편번호 검색', - route: Routes.zipcode, - isActive: currentRoute == Routes.zipcode, - badge: null, - ), + if (_enableZipcodeMenu) + _buildMenuItem( + icon: Icons.location_on_outlined, + title: '우편번호 검색', + route: Routes.zipcode, + isActive: currentRoute == Routes.zipcode, + badge: null, + ), _buildMenuItem( icon: Icons.business_outlined,