mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 01:45:55 +08:00
AppDrawer: Add hidden options to move between repos
This commit doesn't do anything, but it took me way way too long to implement this basic UI. It's commented out for now.
This commit is contained in:
@ -50,21 +50,7 @@ class AppDrawer extends StatelessWidget {
|
||||
// Important: Remove any padding from the ListView.
|
||||
padding: EdgeInsets.zero,
|
||||
children: <Widget>[
|
||||
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: <Widget>[
|
||||
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,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user