CWA-168 | app version added to list tile with background color

This commit is contained in:
Oleksandr Sobol 2020-01-29 19:22:25 +02:00
parent 50d857f23a
commit 9355b2a1f4

View file

@ -279,12 +279,7 @@ class SettingsFormState extends State<SettingsForm> {
SettingsItem( SettingsItem(
onTaped: () => Navigator.pushNamed(context, Routes.faq), onTaped: () => Navigator.pushNamed(context, Routes.faq),
title: ItemHeaders.faq, title: ItemHeaders.faq,
attribute: Attributes.arrow), attribute: Attributes.arrow)
SettingsItem(
onTaped: () {},
title: ItemHeaders.version,
widget: null,
attribute: Attributes.widget)
]); ]);
setState(() {}); setState(() {});
} }
@ -348,9 +343,9 @@ class SettingsFormState extends State<SettingsForm> {
final item = _items[index]; final item = _items[index];
bool _isDrawDivider = true; bool _isDrawDivider = true;
if (item.attribute == Attributes.header) { if (item.attribute == Attributes.header || index == _items.length - 1) {
_isDrawDivider = false; _isDrawDivider = false;
} else if (index < _items.length - 1) { } else {
if (_items[index + 1].attribute == Attributes.header) { if (_items[index + 1].attribute == Attributes.header) {
_isDrawDivider = false; _isDrawDivider = false;
} }
@ -378,9 +373,13 @@ class SettingsFormState extends State<SettingsForm> {
], ],
); );
}), }),
Container( ListTile(
height: 20.0, contentPadding: EdgeInsets.only(left: 20.0),
color: Theme.of(context).accentTextTheme.headline.backgroundColor, title: Text(
settingsStore.itemHeaders[ItemHeaders.version],
style: TextStyle(
fontSize: 14.0, color: Palette.wildDarkBlue)
),
) )
], ],
)); ));