Исправление замечаний

This commit is contained in:
Ivan Murashov
2017-09-12 12:38:10 +03:00
parent d23ca1c991
commit 8fb84947e5
14 changed files with 81 additions and 52 deletions

View File

@@ -83,14 +83,12 @@ class SqliteHelper {
Future<String> getToken() async {
Map session = await selectAll(tableSession);
String token = session != null ? session[columnToken] : null;
print('token: {$token}');
return token;
}
Future<String> getMerchantID() async {
Map session = await selectAll(tableSession);
String merchantID = session != null ? session[columnMerchantID] : null;
print('merchantID: {$merchantID}');
return merchantID;
}
@@ -103,27 +101,23 @@ class SqliteHelper {
Map session = await selectAll(tableSession);
int docID = session != null ? session[columnDocID] : 0;
db.update(tableSession, {columnDocID: docID + 1});
print('docid: {$docID}');
return docID;
}
Future<String> getLocale() async {
Map settings = await selectAll(tableSettings);
String locale = settings != null ? settings[columnLocale] : null;
print('locale: {$locale}');
return locale;
}
Future<int> getCurrency() async {
Map settings = await selectAll(tableSettings);
int currency = settings != null ? settings[columnCurrency] : null;
print('currency: {$currency}');
return currency;
}
Future<int> saveCurrency(int currency) async {
db.update(tableSettings, {columnCurrency: currency});
print('currency: {$currency}');
return currency;
}