copyWith method
AppFile
copyWith(
{ - String? fileKey,
- String? fileName,
- String? filePath,
- Uint8List? fileBytes,
- String? fileUrl,
- String? fileExtension,
- String? fileType,
- int? size,
- XFile? xFile,
- bool clearBytes = false,
})
Implementation
AppFile copyWith({
String? fileKey,
String? fileName,
String? filePath,
Uint8List? fileBytes,
String? fileUrl,
String? fileExtension,
String? fileType,
int? size,
XFile? xFile,
bool clearBytes = false,
}) {
return AppFile(
fileKey: fileKey ?? this.fileKey,
fileName: fileName ?? this.fileName,
filePath: filePath ?? this.filePath,
fileBytes: clearBytes ? null : fileBytes ?? this.fileBytes,
fileUrl: fileUrl ?? this.fileUrl,
fileExtension: fileExtension ?? this.fileExtension,
fileType: fileType ?? this.fileType,
size: size ?? this.size,
xFile: xFile ?? this.xFile,
);
}