AyahRange class

Represents a range of consecutive ayat from a specific surah.

Constructors

AyahRange.new({required Surah surah, required AyahRangeInfo range, required List<Ayah> ayat, String source = "Tanzil Project - https://tanzil.net"})
const
AyahRange.fromJson(Map<String, dynamic> json)
Creates an AyahRange from JSON data
factory

Properties

ayat List<Ayah>
List of ayat in this range
final
ayatByHizb Map<int, List<Ayah>>
Get ayat grouped by Hizb
no setter
ayatByJuz Map<int, List<Ayah>>
Get ayat grouped by Juz
no setter
estimatedReadingMinutes double
Estimated reading time in minutes (assuming 2 ayat per minute)
no setter
firstAyah Ayah?
Get the first ayah in this range
no setter
hashCode int
The hash code for this object.
no setteroverride
hasSajdah bool
Whether this range contains any sajdah ayat
no setter
hizbNumbers Set<int>
Get unique Hizb numbers in this range
no setter
isCompleteSurah bool
Whether this range is the complete surah
no setter
isSingleAyah bool
Whether this range is just a single ayah
no setter
juzNumbers Set<int>
Get unique Juz numbers in this range
no setter
lastAyah Ayah?
Get the last ayah in this range
no setter
range AyahRangeInfo
Information about the range
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sajdahAyat List<Ayah>
Get all sajdah ayat in this range
no setter
source String
Source attribution for the Quran text
final
spansMultipleHizb bool
Whether this range spans multiple Hizb
no setter
spansMultipleJuz bool
Whether this range spans multiple Juz
no setter
surah Surah
The surah this range belongs to
final

Methods

copyWith({Surah? surah, AyahRangeInfo? range, List<Ayah>? ayat, String? source}) AyahRange
Creates a copy of this AyahRange with the given fields replaced with new values
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the AyahRange to JSON
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override