From cc7774707fef51fe597fabeb4698824092393828 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Thu, 14 Feb 2019 23:36:41 +0100 Subject: [PATCH] AppDrawer: Follow the Theme This also looks way prettier as the icons are the same color as the text. --- lib/widgets/app_drawer.dart | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/widgets/app_drawer.dart b/lib/widgets/app_drawer.dart index aa8bc384..86469d7e 100644 --- a/lib/widgets/app_drawer.dart +++ b/lib/widgets/app_drawer.dart @@ -9,10 +9,12 @@ class AppDrawer extends StatelessWidget { Widget setupGitButton = Container(); var appState = StateContainer.of(context).appState; + var textStyle = Theme.of(context).textTheme.body2; + if (!appState.remoteGitRepoConfigured) { setupGitButton = ListTile( - leading: Icon(Icons.sync), - title: Text('Setup Git Host'), + leading: Icon(Icons.sync, color: textStyle.color), + title: Text('Setup Git Host', style: textStyle), trailing: Icon( Icons.info, color: Colors.red, @@ -46,16 +48,16 @@ class AppDrawer extends StatelessWidget { ), setupGitButton, ListTile( - leading: Icon(Icons.share), - title: Text('Share App'), + leading: Icon(Icons.share, color: textStyle.color), + title: Text('Share App', style: textStyle), onTap: () { Navigator.pop(context); Share.share('Checkout GitJournal https://gitjournal.io/'); }, ), ListTile( - leading: Icon(Icons.feedback), - title: Text('Feedback'), + leading: Icon(Icons.feedback, color: textStyle.color), + title: Text('Feedback', style: textStyle), onTap: () { var emailAddress = 'gitjournal.io@gmail.com'; var subject = 'GitJournal Feedback'; @@ -68,8 +70,8 @@ class AppDrawer extends StatelessWidget { }, ), ListTile( - leading: Icon(Icons.settings), - title: Text('Settings'), + leading: Icon(Icons.settings, color: textStyle.color), + title: Text('Settings', style: textStyle), onTap: () { Navigator.pop(context); Navigator.pushNamed(context, "/settings");