copyWith method

DeliveryStatusEntity copyWith({
  1. String? notificationId,
  2. DeliveryStatus? status,
  3. DateTime? timestamp,
  4. String? errorMessage,
  5. int? retryCount,
  6. DateTime? deliveredAt,
  7. DateTime? openedAt,
  8. DateTime? dismissedAt,
  9. Map<String, dynamic>? metadata,
})

Creates a copy of this delivery status with updated fields.

Implementation

DeliveryStatusEntity copyWith({
  String? notificationId,
  DeliveryStatus? status,
  DateTime? timestamp,
  String? errorMessage,
  int? retryCount,
  DateTime? deliveredAt,
  DateTime? openedAt,
  DateTime? dismissedAt,
  Map<String, dynamic>? metadata,
}) {
  return DeliveryStatusEntity(
    notificationId: notificationId ?? this.notificationId,
    status: status ?? this.status,
    timestamp: timestamp ?? this.timestamp,
    errorMessage: errorMessage ?? this.errorMessage,
    retryCount: retryCount ?? this.retryCount,
    deliveredAt: deliveredAt ?? this.deliveredAt,
    openedAt: openedAt ?? this.openedAt,
    dismissedAt: dismissedAt ?? this.dismissedAt,
    metadata: metadata ?? this.metadata,
  );
}