SurahSearchResult class

Represents the result of searching for surahs by name.

Constructors

SurahSearchResult.new({required String searchTerm, required int totalResults, required List<Surah> results, String source = "Tanzil Project - https://tanzil.net"})
const
SurahSearchResult.fromJson(Map<String, dynamic> json)
Creates a SurahSearchResult from JSON data
factory

Properties

exactMatch Surah?
Get the first exact match (if any)
no setter
hashCode int
The hash code for this object.
no setteroverride
hasResults bool
Whether the search returned any results
no setter
isEmpty bool
Whether the search returned no results
no setter
meccanResults List<Surah>
Get Meccan surahs from results
no setter
medinanResults List<Surah>
Get Medinan surahs from results
no setter
results List<Surah>
List of surahs that match the search term
final
resultsByLengthAsc List<Surah>
Get results sorted by number of ayahs (ascending)
no setter
resultsByLengthDesc List<Surah>
Get results sorted by number of ayahs (descending)
no setter
resultsByMushafOrder List<Surah>
Get results sorted by Mushaf order (ID)
no setter
resultsByRevelationOrder List<Surah>
Get results sorted by revelation order
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchTerm String
The search term that was used
final
source String
Source attribution for the Quran text
final
statistics SurahSearchStatistics
Get statistics about the search results
no setter
totalResults int
Total number of surahs that match the search term
final

Methods

copyWith({String? searchTerm, int? totalResults, List<Surah>? results, String? source}) SurahSearchResult
Creates a copy of this SurahSearchResult with the given fields replaced with new values
getResultsByRevelationType(String revelationType) List<Surah>
Get results by revelation type
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the SurahSearchResult to JSON
toString() String
A string representation of this object.
override

Operators

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