copyWith method

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

Implementation

@override
SentryEvent copyWith({
  SentryId? eventId,
  DateTime? timestamp,
  String? platform,
  String? logger,
  String? serverName,
  String? release,
  String? dist,
  String? environment,
  Map<String, String>? modules,
  SentryMessage? message,
  String? transaction,
  dynamic throwable,
  SentryLevel? level,
  String? culprit,
  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,
  SentryUser? user,
  Contexts? contexts,
  List<Breadcrumb>? breadcrumbs,
  SdkVersion? sdk,
  SentryRequest? request,
  DebugMeta? debugMeta,
  List<SentryException>? exceptions,
  List<SentryThread>? threads,
  String? type,
}) =>
    SentryEvent(
      eventId: eventId ?? this.eventId,
      timestamp: timestamp ?? this.timestamp,
      platform: platform ?? this.platform,
      logger: logger ?? this.logger,
      serverName: serverName ?? this.serverName,
      release: release ?? this.release,
      dist: dist ?? this.dist,
      environment: environment ?? this.environment,
      modules: (modules != null ? Map.from(modules) : null) ?? this.modules,
      message: message ?? this.message,
      transaction: transaction ?? this.transaction,
      throwable: throwable ?? _throwable,
      level: level ?? this.level,
      culprit: culprit ?? this.culprit,
      tags: (tags != null ? Map.from(tags) : null) ?? this.tags,
      // ignore: deprecated_member_use_from_same_package
      extra: (extra != null ? Map.from(extra) : null) ?? this.extra,
      fingerprint: (fingerprint != null ? List.from(fingerprint) : null) ??
          this.fingerprint,
      user: user ?? this.user,
      contexts: contexts ?? this.contexts,
      breadcrumbs: (breadcrumbs != null ? List.from(breadcrumbs) : null) ??
          this.breadcrumbs,
      sdk: sdk ?? this.sdk,
      request: request ?? this.request,
      debugMeta: debugMeta ?? this.debugMeta,
      exceptions: (exceptions != null ? List.from(exceptions) : null) ??
          this.exceptions,
      threads: (threads != null ? List.from(threads) : null) ?? this.threads,
      type: type ?? this.type,
      unknown: unknown,
    );