Skip to content

Commit

Permalink
remove margin on expand
Browse files Browse the repository at this point in the history
  • Loading branch information
lohanidamodar committed Dec 26, 2019
1 parent 15de0bd commit 96ee433
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/core/presentation/pages/main_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ class _MainMenuState extends State<MainMenu> {
List<SubMenuItem> unseen;
bool dialogShowing;
bool showNewUiDialog;

Map<String,bool> _expandedData;
@override
void initState() {
super.initState();
unseen = [];
viewDataLoaded = false;
dialogShowing = false;
showNewUiDialog = false;
_expandedData={};
_getViewData();
}

Expand Down Expand Up @@ -156,10 +157,15 @@ class _MainMenuState extends State<MainMenu> {
}
});
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)",
Expand Down

0 comments on commit 96ee433

Please sign in to comment.