mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-10 12:54:38 +00:00
CWA-168 | added app version to settings page (added currentVersion to settings store and item to item_headers)
This commit is contained in:
parent
13618c6939
commit
50d857f23a
3 changed files with 12 additions and 2 deletions
|
@ -14,4 +14,5 @@ class ItemHeaders {
|
||||||
static const support = 'Support';
|
static const support = 'Support';
|
||||||
static const termsAndConditions = 'Terms and conditions';
|
static const termsAndConditions = 'Terms and conditions';
|
||||||
static const faq = 'FAQ';
|
static const faq = 'FAQ';
|
||||||
|
static const version = 'Version';
|
||||||
}
|
}
|
|
@ -279,7 +279,12 @@ 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(() {});
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,6 +46,8 @@ abstract class SettingsStoreBase with Store {
|
||||||
(dynamic _) => _sharedPreferences.setInt(displayActionListModeKey,
|
(dynamic _) => _sharedPreferences.setInt(displayActionListModeKey,
|
||||||
serializeActionlistDisplayModes(actionlistDisplayMode)),
|
serializeActionlistDisplayModes(actionlistDisplayMode)),
|
||||||
fireImmediately: false);
|
fireImmediately: false);
|
||||||
|
|
||||||
|
currentVersion = _sharedPreferences.getInt('current_default_settings_migration_version');
|
||||||
}
|
}
|
||||||
|
|
||||||
static const currentNodeIdKey = 'current_node_id';
|
static const currentNodeIdKey = 'current_node_id';
|
||||||
|
@ -143,6 +145,7 @@ abstract class SettingsStoreBase with Store {
|
||||||
|
|
||||||
SharedPreferences _sharedPreferences;
|
SharedPreferences _sharedPreferences;
|
||||||
Box<Node> _nodes;
|
Box<Node> _nodes;
|
||||||
|
int currentVersion;
|
||||||
|
|
||||||
@action
|
@action
|
||||||
Future setAllowBiometricalAuthentication(
|
Future setAllowBiometricalAuthentication(
|
||||||
|
@ -264,7 +267,8 @@ abstract class SettingsStoreBase with Store {
|
||||||
ItemHeaders.darkMode: S.current.settings_dark_mode,
|
ItemHeaders.darkMode: S.current.settings_dark_mode,
|
||||||
ItemHeaders.support: S.current.settings_support,
|
ItemHeaders.support: S.current.settings_support,
|
||||||
ItemHeaders.termsAndConditions: S.current.settings_terms_and_conditions,
|
ItemHeaders.termsAndConditions: S.current.settings_terms_and_conditions,
|
||||||
ItemHeaders.faq: S.current.faq
|
ItemHeaders.faq: S.current.faq,
|
||||||
|
ItemHeaders.version: 'Version 1.0.$currentVersion'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue