from static method
Implementation
static ContentDispositionHeader from(ContentDisposition disposition,
{String? filename,
DateTime? creationDate,
DateTime? modificationDate,
DateTime? readDate,
int? size}) {
final rawValue;
switch (disposition) {
case ContentDisposition.inline:
rawValue = 'inline';
break;
case ContentDisposition.attachment:
rawValue = 'attachment';
break;
default:
rawValue = 'unsupported';
break;
}
final header = ContentDispositionHeader(rawValue);
header.filename = filename;
header.creationDate = creationDate;
header.modificationDate = modificationDate;
header.readDate = readDate;
header.size = size;
return header;
}