getAssets static method
Implementation
static Future<Map<String, DownloadServiceTotalAssetItem>?> getAssets() async {
String? decodeStr = await _getJson<String>(_assetsKey);
if (decodeStr == null) {
return null;
}
try {
Map<String, dynamic> saveJson = json.decode(decodeStr);
var res = saveJson.map((key, value) => MapEntry(
key, DownloadServiceTotalAssetItem.fromJson(json.decode(value))));
return res;
} catch (e) {
_log(e.toString());
rethrow;
}
}