getCachedPdf method

  1. @override
Future<File?> getCachedPdf(
  1. String id
)
override

Implementation

@override
Future<File?> getCachedPdf(String id) async {
  final pdfCacheBox = await getBox(AppHiveBox.pdfCache.name);
  final String? cachedPath = pdfCacheBox.get(id);
  if (cachedPath != null && File(cachedPath).existsSync()) {
    return File(cachedPath);
  }
    return null;
}