getAllSurahs static method
getAllSurahs يعيد قائمة بأسماء السور.
getAllSurahs returns list of all Quran surahs' names
Implementation
static List<String> getAllSurahs({bool isArabic = true}) {
final cacheKey = 'allSurahs_${isArabic ? 'ar' : 'en'}';
if (_cache.containsKey(cacheKey)) {
return _cache[cacheKey] as List<String>;
}
final surahList = quranCtrl.surahs
.map((surah) => isArabic
? 'سورة ${surah.arabicName}'
: 'Surah ${surah.englishName}')
.toList();
_cache[cacheKey] = surahList;
return surahList;
}