surahSearch method

List<SurahModel> surahSearch(
  1. String text
)

search يبحث في القرآن عن أسماء السور. يعيد قائمة بجميع السور التي يكون أسمها أو رقمها أو رفم الصفحة الخاصة بها مطابق للنص المُعطى.

search Searches the Qur'an for the names of the surahs. Returns a list of all surahs whose name, number, or page number matches the given text.

Implementation

List<SurahModel> surahSearch(String text) {
  final cacheKey = 'surah_search_$text';
  if (_cache.containsKey(cacheKey)) {
    return _cache[cacheKey] as List<SurahModel>;
  }
  final results = quranCtrl.searchSurah(text);
  _cache[cacheKey] = results;
  return results;
}