copyWith method
Creates a copy of this notification entity with updated fields.
Implementation
NotificationEntity copyWith({
String? id,
String? title,
String? body,
Map<String, dynamic>? data,
String? imageUrl,
String? icon,
String? channelId,
DateTime? timestamp,
bool? isDelivered,
bool? isRead,
DateTime? deliveryTime,
DateTime? openedTime,
NotificationSource? source,
}) {
return NotificationEntity(
id: id ?? this.id,
title: title ?? this.title,
body: body ?? this.body,
data: data ?? this.data,
imageUrl: imageUrl ?? this.imageUrl,
icon: icon ?? this.icon,
channelId: channelId ?? this.channelId,
timestamp: timestamp ?? this.timestamp,
isDelivered: isDelivered ?? this.isDelivered,
isRead: isRead ?? this.isRead,
deliveryTime: deliveryTime ?? this.deliveryTime,
openedTime: openedTime ?? this.openedTime,
source: source ?? this.source,
);
}