hasFontForPage method

Future<bool> hasFontForPage(
  1. int pageNumber
)

Checks if a font file for pageNumber (1-based) exists in cache.

Implementation

Future<bool> hasFontForPage(int pageNumber) async {
  final dir = await getCacheDir();
  final file = File('${dir.path}/QCF4_tajweed_${pageNumber.toString().padLeft(3, '0')}.ttf.gz');
  return file.existsSync();
}