SentryEvent constructor

SentryEvent({
  1. SentryId? eventId,
  2. DateTime? timestamp,
  3. Map<String, String>? modules,
  4. Map<String, String>? tags,
  5. @Deprecated('Additional Data is deprecated in favor of structured [Contexts] and should be avoided when possible') Map<String, dynamic>? extra,
  6. List<String>? fingerprint,
  7. List<Breadcrumb>? breadcrumbs,
  8. List<SentryException>? exceptions,
  9. List<SentryThread>? threads,
  10. SdkVersion? sdk,
  11. String? platform,
  12. String? logger,
  13. String? serverName,
  14. String? release,
  15. String? dist,
  16. String? environment,
  17. SentryMessage? message,
  18. String? transaction,
  19. dynamic throwable,
  20. SentryLevel? level,
  21. String? culprit,
  22. SentryUser? user,
  23. Contexts? contexts,
  24. SentryRequest? request,
  25. DebugMeta? debugMeta,
  26. String? type,
})

Creates an event.

Implementation

SentryEvent({
  SentryId? eventId,
  DateTime? timestamp,
  Map<String, String>? modules,
  Map<String, String>? tags,
  @Deprecated(
      'Additional Data is deprecated in favor of structured [Contexts] and should be avoided when possible')
  Map<String, dynamic>? extra,
  List<String>? fingerprint,
  List<Breadcrumb>? breadcrumbs,
  List<SentryException>? exceptions,
  List<SentryThread>? threads,
  this.sdk,
  this.platform,
  this.logger,
  this.serverName,
  this.release,
  this.dist,
  this.environment,
  this.message,
  this.transaction,
  dynamic throwable,
  this.level,
  this.culprit,
  this.user,
  Contexts? contexts,
  this.request,
  this.debugMeta,
  this.type,
})  : eventId = eventId ?? SentryId.newId(),
      timestamp = timestamp ?? getUtcDateTime(),
      contexts = contexts ?? Contexts(),
      modules = modules != null ? Map.from(modules) : null,
      tags = tags != null ? Map.from(tags) : null,
      // ignore: deprecated_member_use_from_same_package
      extra = extra != null ? Map.from(extra) : null,
      fingerprint = fingerprint != null ? List.from(fingerprint) : null,
      breadcrumbs = breadcrumbs != null ? List.from(breadcrumbs) : null,
      exceptions = exceptions != null ? List.from(exceptions) : null,
      threads = threads != null ? List.from(threads) : null,
      _throwable = throwable;