getCurrentPageAyahsSeparatedForBasmalah method

List<List<AyahFontsModel>> getCurrentPageAyahsSeparatedForBasmalah(
  1. int pageIndex
)

Returns a list of lists of AyahFontsModel, where each sublist contains Ayahs that are separated by a Basmalah, for the given page index.

Parameters: pageIndex (int): The index of the page for which to retrieve the Ayahs.

Returns: List<List<AyahFontsModel>>: A list of lists of AyahFontsModel, where each sublist contains Ayahs separated by a Basmalah.

Implementation

List<List<AyahFontsModel>> getCurrentPageAyahsSeparatedForBasmalah(
        int pageIndex) =>
    state.pages[pageIndex]
        .splitBetween((f, s) => f.ayahNumber > s.ayahNumber)
        .toList();