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

Oleksandr Sobol committed Jan 29, 2020 at 19:22 UTC 9355b2a1f4c0997172e616e4a6912f5f8058f87c
1 file changed +10 -11
lib/src/screens/settings/settings.dart
+10 -11
@@ -279,12 +279,7 @@ class SettingsFormState extends State<SettingsForm> {
279 SettingsItem(
280 onTaped: () => Navigator.pushNamed(context, Routes.faq),
281 title: ItemHeaders.faq,
282 - attribute: Attributes.arrow),
283 - SettingsItem(
284 - onTaped: () {},
285 - title: ItemHeaders.version,
286 - widget: null,
287 - attribute: Attributes.widget)
282 + attribute: Attributes.arrow)
283 ]);
284 setState(() {});
285 }
@@ -348,9 +343,9 @@ class SettingsFormState extends State<SettingsForm> {
343 final item = _items[index];
344 bool _isDrawDivider = true;
345
351 - if (item.attribute == Attributes.header) {
346 + if (item.attribute == Attributes.header || index == _items.length - 1) {
347 _isDrawDivider = false;
353 - } else if (index < _items.length - 1) {
348 + } else {
349 if (_items[index + 1].attribute == Attributes.header) {
350 _isDrawDivider = false;
351 }
@@ -378,9 +373,13 @@ class SettingsFormState extends State<SettingsForm> {
373 ],
374 );
375 }),
381 - Container(
382 - height: 20.0,
383 - color: Theme.of(context).accentTextTheme.headline.backgroundColor,
376 + ListTile(
377 + contentPadding: EdgeInsets.only(left: 20.0),
378 + title: Text(
379 + settingsStore.itemHeaders[ItemHeaders.version],
380 + style: TextStyle(
381 + fontSize: 14.0, color: Palette.wildDarkBlue)
382 + ),
383 )
384 ],
385 ));