hasBookmark method
Checks if the given bookmark list contains a bookmark with the given Surah number and Ayah UQ number.
Returns:
true
if the bookmark exists, false
otherwise.
Implementation
bool hasBookmark(int surahNum, int ayahUQNum, List? bookmarkList) =>
(bookmarkList!.firstWhereOrNull(((element) =>
element.surahNumber == surahNum &&
element.ayahUQNumber == ayahUQNum)) !=
null)
? true
: false;