copyWith method
复制并修改模型
Implementation
FileUploadModel copyWith({
String? id,
FileInfo? fileInfo,
String? name,
String? path,
FileSource? source,
UploadStatus? status,
double? progress,
int? fileSize,
String? fileSizeInfo,
String? url,
DateTime? createTime,
DateTime? updateTime,
}) {
return FileUploadModel(
id: id ?? this.id,
fileInfo: fileInfo ?? this.fileInfo,
name: name ?? this.name,
path: path ?? this.path,
source: source ?? this.source,
status: status ?? this.status,
progress: progress ?? this.progress,
fileSize: fileSize ?? this.fileSize,
fileSizeInfo: fileSizeInfo ?? this.fileSizeInfo,
url: url ?? this.url,
createTime: createTime ?? this.createTime,
updateTime: updateTime ?? this.updateTime,
);
}