countAllCachedMedia function
Implementation
Future<int> countAllCachedMedia(GetStorage getStorage) async {
final all = getStorage.read(keyName);
if (all != null) {
final allData = AllCachedMediaInfo.fromJson(json.decode(all));
return allData.cachedMediaInfo?.length ?? 0;
}
return 0;
}