copyWith method

NiceNotificationItem copyWith({
  1. String? id,
  2. String? title,
  3. String? message,
  4. NiceNotificationType? type,
  5. DateTime? timestamp,
  6. String? actionLabel,
  7. VoidCallback? onAction,
  8. bool? read,
  9. Map<String, dynamic>? data,
})

Implementation

NiceNotificationItem copyWith({
  String? id,
  String? title,
  String? message,
  NiceNotificationType? type,
  DateTime? timestamp,
  String? actionLabel,
  VoidCallback? onAction,
  bool? read,
  Map<String, dynamic>? data,
}) {
  return NiceNotificationItem(
    id: id ?? this.id,
    title: title ?? this.title,
    message: message ?? this.message,
    type: type ?? this.type,
    timestamp: timestamp ?? this.timestamp,
    actionLabel: actionLabel ?? this.actionLabel,
    onAction: onAction ?? this.onAction,
    read: read ?? this.read,
    data: data ?? this.data,
  );
}