downloadFile abstract method

Future<void> downloadFile({
  1. required String downloadUrl,
  2. String? fileName,
  3. String? token,
  4. DownloadMethod method = DownloadMethod.GET,
  5. ProgressCallback? onProgress,
  6. CompletedCallback? onCompleted,
  7. ErrorCallback? onError,
})

Downloads a file from the given URL

downloadUrl - URL to download the file from fileName - Optional name for the downloaded file token - Optional authorization token for secure downloads method - HTTP method to use (GET or POST) onProgress - Optional callback to track download progress onCompleted - Optional callback when download is completed onError - Optional callback when an error occurs

Implementation

Future<void> downloadFile(
    {required String downloadUrl,
    String? fileName,
    String? token,
    DownloadMethod method = DownloadMethod.GET,
    ProgressCallback? onProgress,
    CompletedCallback? onCompleted,
    ErrorCallback? onError});