download method

  1. @override
Future<void> download(
  1. String url,
  2. String targetPath, {
  3. String? token,
  4. CancelToken? cancelToken,
})
override

Downloads a file from URL to target path

Parameters:

  • url: Source URL (must be HTTP/HTTPS)
  • targetPath: Full path where file should be saved
  • token: Optional authentication token
  • cancelToken: Optional token for cancellation

Throws:

Implementation

@override
Future<void> download(
  String url,
  String targetPath, {
  String? token,
  CancelToken? cancelToken,
}) async {
  // Delegate to downloadWithProgress, ignore progress events
  await for (final _ in downloadWithProgress(
    url,
    targetPath,
    token: token,
    cancelToken: cancelToken,
  )) {
    // Ignore progress updates
  }
}