checkAllTafsirDownloaded method

Future<Map<int, bool>> checkAllTafsirDownloaded()

شرح: فحص جميع ملفات التفسير Explanation: Check all tafsir files

Implementation

Future<Map<int, bool>> checkAllTafsirDownloaded() async {
  Directory? directory = await getApplicationDocumentsDirectory();
  for (int i = 0; i <= 4; i++) {
    String filePath = '${directory.path}/${tafsirAndTranslateNames[i].name}';
    File file = File(filePath);
    tafsirDownloadStatus.value[i] = await file.exists();
  }
  return tafsirDownloadStatus.value;
}