CWA-168 | added translation for "Version", used arrow function in the callback, used collection.last for setting items

This commit is contained in:
Oleksandr Sobol
2020-02-04 19:47:35 +02:00
parent 524f23b1db
commit 8c5c5636e9
14 changed files with 57 additions and 16 deletions
+1 -1
View File
@@ -343,7 +343,7 @@ class SettingsFormState extends State<SettingsForm> {
final item = _items[index];
bool _isDrawDivider = true;
if (item.attribute == Attributes.header || index == _items.length - 1) {
if (item.attribute == Attributes.header || item == _items.last) {
_isDrawDivider = false;
} else {
if (_items[index + 1].attribute == Attributes.header) {
+2 -4
View File
@@ -48,9 +48,7 @@ abstract class SettingsStoreBase with Store {
serializeActionlistDisplayModes(actionlistDisplayMode)),
fireImmediately: false);
PackageInfo.fromPlatform().then((PackageInfo packageInfo) {
currentVersion = packageInfo.version;
});
PackageInfo.fromPlatform().then((PackageInfo packageInfo) => currentVersion = packageInfo.version);
}
@@ -272,7 +270,7 @@ abstract class SettingsStoreBase with Store {
ItemHeaders.support: S.current.settings_support,
ItemHeaders.termsAndConditions: S.current.settings_terms_and_conditions,
ItemHeaders.faq: S.current.faq,
ItemHeaders.version: 'Version $currentVersion'
ItemHeaders.version: S.current.version(currentVersion)
});
}