getSurahDataByAyah method

SurahFontsModel getSurahDataByAyah(
  1. AyahFontsModel ayah
)

Retrieves the Surah data for a given Ayah.

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

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

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

Implementation

SurahFontsModel getSurahDataByAyah(AyahFontsModel ayah) =>
    state.surahs.firstWhere((s) => s.ayahs.contains(ayah));