|
|
@@ -32,6 +32,8 @@ class SharedPreferencesUtil { |
|
|
|
static Future<bool> setStringValue(String key, String value) async { |
|
|
|
// if (!EmptyUtil.isEmpty(key) && !EmptyUtil.isEmpty(value)) { |
|
|
|
Logger.log('key = ${key}, value = $value'); |
|
|
|
print("key:" + (key ?? "") + " value:" + (value ?? "")); |
|
|
|
|
|
|
|
SharedPreferences prefs = await SharedPreferences.getInstance(); |
|
|
|
if (null != prefs) { |
|
|
|
return prefs.setString(key, value); |
|
|
@@ -52,6 +54,6 @@ class SharedPreferencesUtil { |
|
|
|
|
|
|
|
static Future<bool> clean() async { |
|
|
|
SharedPreferences prefs = await SharedPreferences.getInstance(); |
|
|
|
return await prefs.clear(); |
|
|
|
return await prefs.clear(); |
|
|
|
} |
|
|
|
} |