getMap<T> static method
获取Map类型缓存,内部类型未定义
Implementation
static Future<T> getMap<T>(String key, {T? defValue}) async {
if (_prefs == null) await getInstance();
String data = _prefs?.getString(key) ?? '';
if (data.isNotEmpty) return json.decode(data) as T;
return defValue ?? {} as T;
}