copyWith method

RelayDeliveryTarget copyWith({
  1. String? eventId,
  2. String? relayUrl,
  3. RelayDeliveryReason? reason,
  4. RelayDeliveryState? state,
  5. int? attemptCount,
  6. Object? lastAttemptAt = _noChange,
  7. Object? nextRetryAt = _noChange,
  8. Object? lastError = _noChange,
  9. Object? lastOkMessage = _noChange,
})

Implementation

RelayDeliveryTarget copyWith({
  String? eventId,
  String? relayUrl,
  RelayDeliveryReason? reason,
  RelayDeliveryState? state,
  int? attemptCount,
  Object? lastAttemptAt = _noChange,
  Object? nextRetryAt = _noChange,
  Object? lastError = _noChange,
  Object? lastOkMessage = _noChange,
}) {
  return RelayDeliveryTarget(
    eventId: eventId ?? this.eventId,
    relayUrl: relayUrl ?? this.relayUrl,
    reason: reason ?? this.reason,
    state: state ?? this.state,
    attemptCount: attemptCount ?? this.attemptCount,
    lastAttemptAt: identical(lastAttemptAt, _noChange)
        ? this.lastAttemptAt
        : lastAttemptAt as int?,
    nextRetryAt: identical(nextRetryAt, _noChange)
        ? this.nextRetryAt
        : nextRetryAt as int?,
    lastError: identical(lastError, _noChange)
        ? this.lastError
        : lastError as String?,
    lastOkMessage: identical(lastOkMessage, _noChange)
        ? this.lastOkMessage
        : lastOkMessage as String?,
  );
}