mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 18:03:14 +08:00
AppDrawer: Add a divider between some elements
This clearly groups them together.
This commit is contained in:
@ -12,7 +12,7 @@ import 'package:url_launcher/url_launcher.dart';
|
|||||||
class AppDrawer extends StatelessWidget {
|
class AppDrawer extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
Widget setupGitButton = Container();
|
Widget setupGitButton;
|
||||||
var appState = StateContainer.of(context).appState;
|
var appState = StateContainer.of(context).appState;
|
||||||
|
|
||||||
var textStyle = Theme.of(context).textTheme.body2;
|
var textStyle = Theme.of(context).textTheme.body2;
|
||||||
@ -36,6 +36,8 @@ class AppDrawer extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var divider = Row(children: <Widget>[Expanded(child: Divider())]);
|
||||||
|
|
||||||
return Drawer(
|
return Drawer(
|
||||||
child: ListView(
|
child: ListView(
|
||||||
// Important: Remove any padding from the ListView.
|
// Important: Remove any padding from the ListView.
|
||||||
@ -56,7 +58,7 @@ class AppDrawer extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
setupGitButton,
|
if (setupGitButton != null) ...[setupGitButton, divider],
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Icon(Icons.note, color: textStyle.color),
|
leading: Icon(Icons.note, color: textStyle.color),
|
||||||
title: Text('Notes', style: textStyle),
|
title: Text('Notes', style: textStyle),
|
||||||
@ -82,6 +84,7 @@ class AppDrawer extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
divider,
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Icon(Icons.share, color: textStyle.color),
|
leading: Icon(Icons.share, color: textStyle.color),
|
||||||
title: Text('Share App', style: textStyle),
|
title: Text('Share App', style: textStyle),
|
||||||
|
Reference in New Issue
Block a user