copyWith method

NotificationModel copyWith({
  1. String? id,
  2. String? title,
  3. String? message,
  4. String? userId,
  5. bool? isRead,
  6. NotificationPriority? priority,
  7. DateTime? createdAt,
})

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,
  );
}