cancelDownloadSurah method
void
cancelDownloadSurah()
يلغي عملية تحميل الملفات الصوتية الجارية حالياً. هذه الدالة مفيدة عندما يريد المستخدم إيقاف التحميل لتوفير البيانات أو تحرير مساحة التخزين. يمكن استخدامها لإلغاء تحميل أي سورة قيد التحميل حالياً.
لا تحتاج هذه الدالة لأي معاملات، وستقوم بإلغاء أي عملية تحميل نشطة. الملفات المحملة جزئياً سيتم حذفها لتوفير مساحة التخزين.
Cancels the currently ongoing audio file download process. This function is useful when the user wants to stop the download to save data or free up storage space. It can be used to cancel the download of any surah currently being downloaded.
This function doesn't require any parameters and will cancel any active download operation. Partially downloaded files will be deleted to save storage space.
مثال للاستخدام / Example usage:
// إلغاء تحميل السورة الجاري حالياً
// Cancel the currently ongoing surah download
quranLibrary().cancelDownloadSurah();
// يمكن استخدامها مع واجهة المستخدم
// Can be used with user interface
onPressed: () => quranLibrary().cancelDownloadSurah(),
Implementation
void cancelDownloadSurah() => AudioCtrl.instance.cancelDownload();