copyWith method

UploadedFile copyWith({
  1. String? filename,
  2. String? contentType,
})

Copy this file with new filename

Implementation

UploadedFile copyWith({String? filename, String? contentType}) {
  return UploadedFile.fromBytes(
    filename: filename ?? this.filename,
    bytes: _cachedBytes as Uint8List,
    contentType: contentType ?? this.contentType,
  );
}