RG-3443 Экран настроек локализации

This commit is contained in:
Ivan Murashov
2017-09-20 18:54:39 +03:00
parent a56839dca4
commit 912aa2248f
6 changed files with 49 additions and 29 deletions

View File

@@ -1,5 +1,6 @@
import 'dart:async';
import 'dart:io';
import 'dart:ui';
import 'package:path/path.dart';
import 'package:sqflite/sqflite.dart';
@@ -110,15 +111,18 @@ class SqliteHelper {
return locale;
}
Future saveLocale(String locale) async {
db.update(tableSettings, {columnLocale: locale});
}
Future<int> getCurrency() async {
Map settings = await selectAll(tableSettings);
int currency = settings != null ? settings[columnCurrency] : null;
return currency;
}
Future<int> saveCurrency(int currency) async {
Future saveCurrency(int currency) async {
db.update(tableSettings, {columnCurrency: currency});
return currency;
}
Future<Map> selectAll(String table) async {