SentryEnvelopeItem.fromUserFeedback constructor
- @Deprecated('Will be removed in a future version.')
- 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);
}