SentryEnvelopeItem.fromAttachment constructor
SentryEnvelopeItem.fromAttachment(
- SentryAttachment attachment
Implementation
factory SentryEnvelopeItem.fromAttachment(SentryAttachment attachment) {
final header = SentryEnvelopeItemHeader(
SentryItemType.attachment,
contentType: attachment.contentType,
fileName: attachment.filename,
attachmentType: attachment.attachmentType,
);
return SentryEnvelopeItem(
header,
() => attachment.bytes,
originalObject: attachment,
);
}