readCache static method

UpdateCache? readCache()

Implementation

static UpdateCache? readCache() {
  try {
    final file = getCacheFile();
    if (file.existsSync()) {
      final content = file.readAsStringSync();
      return UpdateCache.fromJson(
        jsonDecode(content) as Map<String, dynamic>,
      );
    }
  } catch (_) {}
  return null;
}