QuranAudioService class

Audio service for playing Quran ayah-by-ayah from everyayah.com.

Supports 13+ reciters, auto-advance, speed control, and skip next/prev.

Properties

downloadProgress → ValueNotifier<double?>
Download progress for offline downloads (null = idle, 0.0-1.0).
final
hashCode → int
The hash code for this object.
no setterinherited
offlineDiskUsage → Future<int>
Get total disk usage of downloaded audio in bytes.
no setter
quality → AudioQuality
no setter
reciterIndex → int
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
speed → double
no setter
state → ValueNotifier<QuranAudioState>
final
storage ↔ QuranStorage
Storage backend. Defaults to JsonFileQuranStorage.
getter/setter pair

Methods

clearAllDownloads() → Future<void>
Clear all downloaded audio.
deleteSurahDownload(int surah, {int? reciterIndex}) → Future<void>
Delete all downloaded audio for a surah.
dispose() → void
Dispose the audio player.
downloadJuz(int juz, {int? reciterIndex}) → Future<void>
Download a full juz for offline playback.
downloadSurah(int surah, {int? reciterIndex}) → Future<void>
Download all ayahs of a surah for offline playback.
init() → Future<void>
Initialize the audio player and restore last reciter.
isSurahDownloaded(int surah, {int? reciterIndex}) → Future<bool>
Check if a surah is fully downloaded offline.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
playAyah(int surah, int ayah) → Future<void>
Play a specific ayah. Uses offline file if available, else streams from CDN.
playSurahFrom(int surah, int startAyah) → Future<void>
Play all ayahs from start to end of the current surah.
setQuality(AudioQuality q) → Future<void>
Set audio quality preference.
setReciter(int index) → Future<void>
Change the reciter.
setRepeatCount(int count) → void
Set repeat count: 0 = off, >0 = repeat N times, -1 = infinite.
setSpeed(double speed) → Future<void>
Set playback speed (0.5x to 2.0x).
skipNext() → void
Skip to the next ayah / surah.
skipPrevious() → void
Skip to the previous ayah / surah.
stop() → void
Stop playback.
togglePlayPause() → void
Toggle play / pause.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

instance → QuranAudioService
final

Constants

reciters → const List<QuranReciter>