copyWith method
Implementation
NotificationModel copyWith({
String? id,
String? title,
String? message,
String? userId,
bool? isRead,
NotificationPriority? priority,
DateTime? createdAt,
}) {
return NotificationModel(
id: id ?? this.id,
title: title ?? this.title,
message: message ?? this.message,
userId: userId ?? this.userId,
isRead: isRead ?? this.isRead,
priority: priority ?? this.priority,
createdAt: createdAt ?? this.createdAt,
);
}