copyWith method
NotificationPayload
copyWith({
- String? id,
- String? title,
- String? body,
- Map<
String, dynamic> ? data, - String? imageUrl,
- String? icon,
- String? sound,
- String? badge,
- String? tag,
- String? channelId,
- String? channelName,
- String? channelDescription,
- NotificationImportance? importance,
- NotificationPriority? priority,
- DateTime? timestamp,
- String? largeIcon,
- String? bigPicture,
- List<
NotificationAction> ? actions, - String? color,
- List<
int> ? vibrationPattern, - String? category,
- String? threadIdentifier,
- String? collapseKey,
- int? ttl,
- Duration? deliveryDelay,
- bool? isScheduled,
- DateTime? scheduledDateTime,
- RepeatInterval? repeatInterval,
- String? payload,
- bool? showTimestamp,
- bool? ongoing,
- bool? autoCancel,
- bool? silent,
- NotificationPayload? publicVersion,
- String? ticker,
- int? whenTimestamp,
- bool? usesChronometer,
- bool? chronometerCountDown,
- bool? enableLights,
- bool? enableVibration,
- bool? playSound,
- bool? criticalAlert,
- InterruptionLevel? interruptionLevel,
Copy with new values.
Implementation
NotificationPayload copyWith({
String? id,
String? title,
String? body,
Map<String, dynamic>? data,
String? imageUrl,
String? icon,
String? sound,
String? badge,
String? tag,
String? channelId,
String? channelName,
String? channelDescription,
NotificationImportance? importance,
NotificationPriority? priority,
DateTime? timestamp,
String? largeIcon,
String? bigPicture,
List<NotificationAction>? actions,
String? color,
List<int>? vibrationPattern,
String? category,
String? threadIdentifier,
String? collapseKey,
int? ttl,
Duration? deliveryDelay,
bool? isScheduled,
DateTime? scheduledDateTime,
RepeatInterval? repeatInterval,
String? payload,
bool? showTimestamp,
bool? ongoing,
bool? autoCancel,
bool? silent,
NotificationPayload? publicVersion,
String? ticker,
int? whenTimestamp,
bool? usesChronometer,
bool? chronometerCountDown,
bool? enableLights,
bool? enableVibration,
bool? playSound,
bool? criticalAlert,
InterruptionLevel? interruptionLevel,
}) {
return NotificationPayload(
id: id ?? this.id,
title: title ?? this.title,
body: body ?? this.body,
data: data ?? this.data,
imageUrl: imageUrl ?? this.imageUrl,
icon: icon ?? this.icon,
sound: sound ?? this.sound,
badge: badge ?? this.badge,
tag: tag ?? this.tag,
channelId: channelId ?? this.channelId,
channelName: channelName ?? this.channelName,
channelDescription: channelDescription ?? this.channelDescription,
importance: importance ?? this.importance,
priority: priority ?? this.priority,
timestamp: timestamp ?? this.timestamp,
largeIcon: largeIcon ?? this.largeIcon,
bigPicture: bigPicture ?? this.bigPicture,
actions: actions ?? this.actions,
color: color ?? this.color,
vibrationPattern: vibrationPattern ?? this.vibrationPattern,
category: category ?? this.category,
threadIdentifier: threadIdentifier ?? this.threadIdentifier,
collapseKey: collapseKey ?? this.collapseKey,
ttl: ttl ?? this.ttl,
deliveryDelay: deliveryDelay ?? this.deliveryDelay,
isScheduled: isScheduled ?? this.isScheduled,
scheduledDateTime: scheduledDateTime ?? this.scheduledDateTime,
repeatInterval: repeatInterval ?? this.repeatInterval,
payload: payload ?? this.payload,
showTimestamp: showTimestamp ?? this.showTimestamp,
ongoing: ongoing ?? this.ongoing,
autoCancel: autoCancel ?? this.autoCancel,
silent: silent ?? this.silent,
publicVersion: publicVersion ?? this.publicVersion,
ticker: ticker ?? this.ticker,
whenTimestamp: whenTimestamp ?? this.whenTimestamp,
usesChronometer: usesChronometer ?? this.usesChronometer,
chronometerCountDown: chronometerCountDown ?? this.chronometerCountDown,
enableLights: enableLights ?? this.enableLights,
enableVibration: enableVibration ?? this.enableVibration,
playSound: playSound ?? this.playSound,
criticalAlert: criticalAlert ?? this.criticalAlert,
interruptionLevel: interruptionLevel ?? this.interruptionLevel,
);
}