copyWith abstract method

Task copyWith({
  1. String? taskId,
  2. String? url,
  3. String? filename,
  4. Map<String, String>? headers,
  5. String? httpRequestMethod,
  6. Object? post,
  7. String? directory,
  8. BaseDirectory? baseDirectory,
  9. String? group,
  10. Updates? updates,
  11. bool? requiresWiFi,
  12. int? retries,
  13. int? retriesRemaining,
  14. bool? allowPause,
  15. int? priority,
  16. String? metaData,
  17. String? displayName,
  18. DateTime? creationTime,

Returns a copy of the Task with optional changes to specific fields


Task copyWith(
    {String? taskId,
    String? url,
    String? filename,
    Map<String, String>? headers,
    String? httpRequestMethod,
    Object? post,
    String? directory,
    BaseDirectory? baseDirectory,
    String? group,
    Updates? updates,
    bool? requiresWiFi,
    int? retries,
    int? retriesRemaining,
    bool? allowPause,
    int? priority,
    String? metaData,
    String? displayName,
    DateTime? creationTime});