copyWith method
Creates a copy of this payload with the given fields replaced.
Implementation
NotificationPayload copyWith({
String? title,
String? body,
String? imageUrl,
String? route,
Map<String, dynamic>? data,
List<NotificationAction>? actions,
int? id,
String? channelId,
String? category,
String? sound,
int? badge,
int? ttl,
String? priority,
}) {
return NotificationPayload(
title: title ?? this.title,
body: body ?? this.body,
imageUrl: imageUrl ?? this.imageUrl,
route: route ?? this.route,
data: data ?? this.data,
actions: actions ?? this.actions,
id: id ?? this.id,
channelId: channelId ?? this.channelId,
category: category ?? this.category,
sound: sound ?? this.sound,
badge: badge ?? this.badge,
ttl: ttl ?? this.ttl,
priority: priority ?? this.priority,
);
}