SentryEnvelopeItem.fromUserFeedback constructor

  1. @Deprecated('Will be removed in a future version.')
SentryEnvelopeItem.fromUserFeedback(
  1. SentryUserFeedback feedback
)

Create a SentryEnvelopeItem which sends SentryUserFeedback.

Implementation

@Deprecated('Will be removed in a future version.')
factory SentryEnvelopeItem.fromUserFeedback(SentryUserFeedback feedback) {
  final dataFactory = () => utf8JsonEncoder.convert(feedback.toJson());

  final header = SentryEnvelopeItemHeader(
    SentryItemType.userFeedback,
    contentType: 'application/json',
  );
  return SentryEnvelopeItem(
    header,
    dataFactory,
    originalObject: feedback,
  );
}