getSurahDataByAyah method

SurahModel getSurahDataByAyah(
  1. AyahModel ayah
)

Retrieves the Surah data for a given Ayah.

This method returns the SurahModel of the Surah that contains the given Ayah.

Parameters: ayah (AyahModel): The Ayah for which to retrieve the Surah data.

Returns: SurahModel: The SurahModel representing the Surah of the given Ayah.

Implementation

SurahModel getSurahDataByAyah(AyahModel ayah) =>
    state.surahs.firstWhere((s) => s.ayahs.contains(ayah));