getStringMap static method
获取sp中key的map值
Implementation
static Map getStringMap(String? key, {Map defValue = const {}}) {
if (key == null || key.isEmpty) {
return defValue;
}
String? jsonString = _preferences.getString(key);
if (jsonString == null) {
return defValue;
}
return json.decode(jsonString);
}