copyWith method

Damage copyWith({
  1. num? score,
  2. List<num?>? box,
  3. String? maskPath,
  4. bool? isPart,
  5. num? overlapRate,
  6. String? className,
  7. String? damageKey,
  8. String? damageColor,
  9. String? maskUrl,
  10. String? classUuid,
  11. String? location,
  12. int? claimId,
  13. String? imageId,
  14. bool? isMaskDuplicate,
  15. String? damageTypeName,
  16. String? damageTypeColor,
})

Implementation

Damage copyWith({
  num? score,
  List<num?>? box,
  String? maskPath,
  bool? isPart,
  num? overlapRate,
  String? className,
  String? damageKey,
  String? damageColor,
  String? maskUrl,
  String? classUuid,
  String? location,
  int? claimId,
  String? imageId,
  bool? isMaskDuplicate,
  String? damageTypeName,
  String? damageTypeColor,
}) {
  return Damage(
    score: score ?? this.score,
    box: box ?? this.box,
    maskPath: maskPath ?? this.maskPath,
    isPart: isPart ?? this.isPart,
    overlapRate: overlapRate ?? this.overlapRate,
    className: className ?? this.className,
    damageKey: damageKey ?? this.damageKey,
    damageColor: damageColor ?? this.damageColor,
    maskUrl: maskUrl ?? this.maskUrl,
    claimId: claimId ?? this.claimId,
    classUuid: classUuid ?? this.classUuid,
    damageTypeColor: damageTypeColor ?? this.damageTypeColor,
    damageTypeName: damageTypeName ?? this.damageTypeName,
    imageId: imageId ?? this.imageId,
    isMaskDuplicate: isMaskDuplicate ?? this.isMaskDuplicate,
    location: location ?? this.location,
  );
}