Android all done.

This commit is contained in:
Ivan Murashov
2018-03-12 21:41:41 +03:00
parent 3bc43724c6
commit 11640c0a16
15 changed files with 111 additions and 253 deletions

View File

@@ -48,11 +48,11 @@ class SettingsState extends BaseState<SettingsScreen> {
@override
void initState() {
print('init state!');
super.initState();
}
@override Widget build(BuildContext ctx) {
// TODO: Перенести в initStater
helper.getSettings(true).then((info) {
setState(() {
menuItems[0].title = StringsLocalization.currency();
@@ -93,7 +93,6 @@ class SettingsState extends BaseState<SettingsScreen> {
List<Widget> widgets = new List();
for (int i = 0; i < menuItems.length; i++) {
if (menuItems[i].selectedValue.toString() != '') {
print('title : ${menuItems[i].title}');
widgets.add(
getSettingsItem(() => onPressed(menuItems.indexOf(menuItems[i])),
menuItems[i].title,
@@ -108,7 +107,6 @@ class SettingsState extends BaseState<SettingsScreen> {
case 0 :
return getCurrencyTitle(int.parse(menuItems[position].selectedValue));
case 1 :
print('val : ${menuItems[position].selectedValue}');
return getLocaleTitle(menuItems[position].selectedValue);
default :
return null;
@@ -188,11 +186,11 @@ class SettingsState extends BaseState<SettingsScreen> {
helper.getToken().then((token) {
getDeleteTokenRequest(token).then((response) {
helper.clear().then((result) {
Navigator.of(context).pop(null);
Navigator.of(context).pop('');
});
}).catchError((error) {
print(error.toString());
Navigator.of(context).pop(null);
Navigator.of(context).pop('');
});
});
}