getJuzByPage method
Retrieves the Juz data for a given page number.
This method returns the AyahFontsModel of the Juz that contains the first Ayah on the specified page.
Parameters: page (int): The page number for which to retrieve the Juz data.
Returns:
AyahFontsModel: The AyahFontsModel representing the Juz of the first
Ayah on the specified page. If no Ayah is found, an empty AyahFontsModel
is returned.
Implementation
AyahFontsModel getJuzByPage(int page) {
return state.allAyahs.firstWhere(
(a) => a.page == page + 1,
orElse: () => AyahFontsModel._empty(),
);
}