From 96ee43379c80d1964e04cdc843d03689c0bb24a0 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 26 Dec 2019 19:34:05 +0545 Subject: [PATCH] remove margin on expand --- lib/core/presentation/pages/main_menu.dart | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/core/presentation/pages/main_menu.dart b/lib/core/presentation/pages/main_menu.dart index 4fe14895..c7b13ddb 100644 --- a/lib/core/presentation/pages/main_menu.dart +++ b/lib/core/presentation/pages/main_menu.dart @@ -27,7 +27,7 @@ class _MainMenuState extends State { List unseen; bool dialogShowing; bool showNewUiDialog; - + Map _expandedData; @override void initState() { super.initState(); @@ -35,6 +35,7 @@ class _MainMenuState extends State { viewDataLoaded = false; dialogShowing = false; showNewUiDialog = false; + _expandedData={}; _getViewData(); } @@ -156,10 +157,15 @@ class _MainMenuState extends State { } }); return BorderedContainer( - margin: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 4.0), + margin: EdgeInsets.symmetric(horizontal: _expandedData[page.title] != null && _expandedData[page.title] ? 0 : 8.0, vertical: 4.0), padding: const EdgeInsets.all(0), elevation: 0, child: ExpansionTile( + onExpansionChanged: (val) { + setState(() { + _expandedData[page.title] = val; + }); + }, leading: Icon(page.icon), title: Text( "${page.title} (${page.items.length} layouts)",