copyWith method

HlsDownloadOptions copyWith({
  1. String? downloadId,
  2. int? retryAttempts,
  3. Map<String, String>? customHeaders,
  4. HlsVariantSelection? variantSelection,
  5. bool? combineSegments,
  6. bool? deleteSegmentsAfterCombine,
  7. bool? keepTempFilesOnFailure,
  8. String? outputFileExtension,
  9. String? outputDirectoryPath,
  10. BatchProgressCallback? batchProgressCallback,
  11. HlsLogLevel? logLevel,
  12. HlsLogCallback? logCallback,
})

Implementation

HlsDownloadOptions copyWith({
  String? downloadId,
  int? retryAttempts,
  Map<String, String>? customHeaders,
  HlsVariantSelection? variantSelection,
  bool? combineSegments,
  bool? deleteSegmentsAfterCombine,
  bool? keepTempFilesOnFailure,
  String? outputFileExtension,
  String? outputDirectoryPath,
  BatchProgressCallback? batchProgressCallback,
  HlsLogLevel? logLevel,
  HlsLogCallback? logCallback,
}) {
  return HlsDownloadOptions(
    downloadId: downloadId ?? this.downloadId,
    retryAttempts: retryAttempts ?? this.retryAttempts,
    customHeaders: customHeaders ?? this.customHeaders,
    variantSelection: variantSelection ?? this.variantSelection,
    combineSegments: combineSegments ?? this.combineSegments,
    deleteSegmentsAfterCombine:
        deleteSegmentsAfterCombine ?? this.deleteSegmentsAfterCombine,
    keepTempFilesOnFailure:
        keepTempFilesOnFailure ?? this.keepTempFilesOnFailure,
    outputFileExtension: outputFileExtension ?? this.outputFileExtension,
    outputDirectoryPath: outputDirectoryPath ?? this.outputDirectoryPath,
    batchProgressCallback:
        batchProgressCallback ?? this.batchProgressCallback,
    logLevel: logLevel ?? this.logLevel,
    logCallback: logCallback ?? this.logCallback,
  );
}