diff --git a/lib/widgets/app_drawer.dart b/lib/widgets/app_drawer.dart index 7c9f4741..a9eaa4a2 100644 --- a/lib/widgets/app_drawer.dart +++ b/lib/widgets/app_drawer.dart @@ -50,21 +50,7 @@ class AppDrawer extends StatelessWidget { // Important: Remove any padding from the ListView. padding: EdgeInsets.zero, children: [ - DrawerHeader( - decoration: BoxDecoration( - color: Theme.of(context).highlightColor, - ), - child: const Padding( - padding: EdgeInsets.all(8.0), - child: DecoratedBox( - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage('assets/icon/icon.png'), - ), - ), - ), - ), - ), + _AppDrawerHeader(), if (setupGitButton != null) ...[setupGitButton, divider], if (!Settings.instance.proMode) _buildDrawerTile( @@ -272,3 +258,51 @@ void _navTopLevel(BuildContext context, String toRoute) { Navigator.pushNamed(context, toRoute); } } + +class _AppDrawerHeader extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Stack( + children: [ + DrawerHeader( + decoration: BoxDecoration( + color: Theme.of(context).highlightColor, + ), + child: const Padding( + padding: EdgeInsets.all(8.0), + child: DecoratedBox( + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage('assets/icon/icon.png'), + ), + ), + ), + ), + ), + /* + Positioned.fill( + child: Align( + alignment: Alignment.centerLeft, + child: IconButton( + padding: const EdgeInsets.all(0), + icon: Icon(Icons.arrow_left, size: 42.0), + onPressed: () {}, + ), + ), + ), + Positioned.fill( + child: Align( + alignment: Alignment.centerRight, + child: IconButton( + padding: const EdgeInsets.all(0), + icon: Icon(Icons.arrow_right, size: 42.0), + onPressed: () {}, + ), + ), + ), + */ + ], + fit: StackFit.passthrough, + ); + } +}