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 cachedItem =
      _CachedItem(() async => utf8JsonEncoder.convert(feedback.toJson()));

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