Merge pull request #14 from cake-tech/CWA-157-highlight-current-language-in-settings

CWA-157 | highlighted current language in change language page
This commit is contained in:
M 2020-01-10 20:01:34 +02:00
commit a751967230

View file

@ -29,6 +29,9 @@ class ChangeLanguage extends BasePage {
final settingsStore = Provider.of<SettingsStore>(context); final settingsStore = Provider.of<SettingsStore>(context);
final currentLanguage = Provider.of<Language>(context); final currentLanguage = Provider.of<Language>(context);
final currentColor = Theme.of(context).selectedRowColor;
final notCurrentColor = Theme.of(context).accentTextTheme.subhead.backgroundColor;
return Container( return Container(
padding: EdgeInsets.only(top: 10.0, bottom: 10.0), padding: EdgeInsets.only(top: 10.0, bottom: 10.0),
child: ListView.builder( child: ListView.builder(
@ -41,7 +44,7 @@ class ChangeLanguage extends BasePage {
return Container( return Container(
margin: EdgeInsets.only(top: 10.0, bottom: 10.0), margin: EdgeInsets.only(top: 10.0, bottom: 10.0),
color: Theme.of(context).accentTextTheme.subhead.backgroundColor, color: isCurrent ? currentColor : notCurrentColor,
child: ListTile( child: ListTile(
title: Text( title: Text(
_languages.values.elementAt(index), _languages.values.elementAt(index),