countAllCachedMedia function

Future<int> countAllCachedMedia(
  1. GetStorage getStorage
)

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;
}