downloadMaterial abstract method

Future<MaterialFileDto> downloadMaterial(
  1. MaterialRefDto material,
  2. String directory, {
  3. CancelToken? cancelToken,
  4. ProgressCallback? onReceiveProgress,
})

Resolves fresh access information and downloads a file into directory.

Keeps course selection locked until the transfer and partial-file cleanup finish. Preserves the required Referer and authentication cookies. Throws UnsupportedError for iStream resources. The caller owns cleanup of successfully downloaded files.

Implementation

Future<MaterialFileDto> downloadMaterial(
  MaterialRefDto material,
  String directory, {
  CancelToken? cancelToken,
  ProgressCallback? onReceiveProgress,
});