Skip to content

Commit

Permalink
Adjusting drawer styling
Browse files Browse the repository at this point in the history
  • Loading branch information
CGQAQ committed Aug 2, 2021
1 parent 1f56979 commit eecda3d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/views/drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ enum PageIndex {
}

final _navItems = ["书架", "搜索", "推荐"];
var _page = _navItems[0];

Drawer mainDrawer(
GlobalKey<ScaffoldState> state, ValueChanged<PageIndex> onchange) {
Expand Down Expand Up @@ -42,7 +43,7 @@ Widget _myListTile(
return Container(
height: 75,
decoration: BoxDecoration(
color: Colors.blue[300],
color: _page == text ? Colors.blue[500] : Colors.blue[400],
border: Border(
bottom: BorderSide(
color: Colors.lightBlueAccent,
Expand All @@ -65,6 +66,7 @@ Widget _myListTile(
if (state.currentState.hasDrawer && state.currentState.isDrawerOpen) {
Navigator.of(state.currentContext).pop();
}
_page = text;
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 10),
Expand Down

0 comments on commit eecda3d

Please sign in to comment.