copyWith method

NotificationPayload copyWith({
  1. String? id,
  2. String? title,
  3. String? body,
  4. Map<String, dynamic>? data,
  5. String? imageUrl,
  6. String? icon,
  7. String? sound,
  8. String? badge,
  9. String? tag,
  10. String? channelId,
  11. String? channelName,
  12. String? channelDescription,
  13. NotificationImportance? importance,
  14. NotificationPriority? priority,
  15. DateTime? timestamp,
  16. String? largeIcon,
  17. String? bigPicture,
  18. List<NotificationAction>? actions,
  19. String? color,
  20. List<int>? vibrationPattern,
  21. String? category,
  22. String? threadIdentifier,
  23. String? collapseKey,
  24. int? ttl,
  25. Duration? deliveryDelay,
  26. bool? isScheduled,
  27. DateTime? scheduledDateTime,
  28. RepeatInterval? repeatInterval,
  29. String? payload,
  30. bool? showTimestamp,
  31. bool? ongoing,
  32. bool? autoCancel,
  33. bool? silent,
  34. NotificationPayload? publicVersion,
  35. String? ticker,
  36. int? whenTimestamp,
  37. bool? usesChronometer,
  38. bool? chronometerCountDown,
  39. bool? enableLights,
  40. bool? enableVibration,
  41. bool? playSound,
  42. bool? criticalAlert,
  43. 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,
  );
}