SentryEnvelopeItem.fromClientReport constructor

SentryEnvelopeItem.fromClientReport(
  1. ClientReport clientReport
)

Create a SentryEnvelopeItem which holds the ClientReport data.

Implementation

factory SentryEnvelopeItem.fromClientReport(ClientReport clientReport) {
  return SentryEnvelopeItem(
    SentryEnvelopeItemHeader(
      SentryItemType.clientReport,
      contentType: 'application/json',
    ),
    () => utf8JsonEncoder.convert(clientReport.toJson()),
    originalObject: clientReport,
  );
}