copyWith method

AndroidNotificationConfig copyWith({
  1. String? channelId,
  2. String? channelName,
  3. String? channelDescription,
  4. Importance? importance,
  5. Priority? priority,
  6. String? ticker,
  7. String? icon,
  8. bool? playSound,
  9. bool? enableVibration,
  10. List<int>? vibrationPattern,
  11. String? groupKey,
  12. bool? setAsGroupSummary,
  13. GroupAlertBehavior? groupAlertBehavior,
  14. bool? autoCancel,
  15. bool? ongoing,
  16. bool? silent,
  17. Color? color,
  18. String? largeIcon,
  19. bool? onlyAlertOnce,
  20. bool? showWhen,
  21. int? when,
  22. bool? usesChronometer,
  23. bool? chronometerCountDown,
  24. bool? channelShowBadge,
  25. bool? showProgress,
  26. int? maxProgress,
  27. int? progress,
  28. bool? indeterminate,
  29. AndroidNotificationChannelAction? channelAction,
  30. bool? enableLights,
  31. Color? ledColor,
  32. int? ledOnMs,
  33. int? ledOffMs,
  34. NotificationVisibility? visibility,
  35. int? timeoutAfter,
  36. bool? fullScreenIntent,
  37. String? shortcutId,
  38. List<int>? additionalFlags,
  39. String? tag,
  40. List<AndroidNotificationAction>? actions,
  41. bool? colorized,
  42. AudioAttributesUsage? audioAttributesUsage,
})

Creates a copy of this config with the specified fields replaced.

Implementation

AndroidNotificationConfig copyWith({
  String? channelId,
  String? channelName,
  String? channelDescription,
  Importance? importance,
  Priority? priority,
  String? ticker,
  String? icon,
  bool? playSound,
  bool? enableVibration,
  List<int>? vibrationPattern,
  String? groupKey,
  bool? setAsGroupSummary,
  GroupAlertBehavior? groupAlertBehavior,
  bool? autoCancel,
  bool? ongoing,
  bool? silent,
  Color? color,
  String? largeIcon,
  bool? onlyAlertOnce,
  bool? showWhen,
  int? when,
  bool? usesChronometer,
  bool? chronometerCountDown,
  bool? channelShowBadge,
  bool? showProgress,
  int? maxProgress,
  int? progress,
  bool? indeterminate,
  AndroidNotificationChannelAction? channelAction,
  bool? enableLights,
  Color? ledColor,
  int? ledOnMs,
  int? ledOffMs,
  NotificationVisibility? visibility,
  int? timeoutAfter,
  bool? fullScreenIntent,
  String? shortcutId,
  List<int>? additionalFlags,
  String? tag,
  List<AndroidNotificationAction>? actions,
  bool? colorized,
  AudioAttributesUsage? audioAttributesUsage,
}) {
  return AndroidNotificationConfig(
    channelId: channelId ?? this.channelId,
    channelName: channelName ?? this.channelName,
    channelDescription: channelDescription ?? this.channelDescription,
    importance: importance ?? this.importance,
    priority: priority ?? this.priority,
    ticker: ticker ?? this.ticker,
    icon: icon ?? this.icon,
    playSound: playSound ?? this.playSound,
    enableVibration: enableVibration ?? this.enableVibration,
    vibrationPattern: vibrationPattern ?? this.vibrationPattern,
    groupKey: groupKey ?? this.groupKey,
    setAsGroupSummary: setAsGroupSummary ?? this.setAsGroupSummary,
    groupAlertBehavior: groupAlertBehavior ?? this.groupAlertBehavior,
    autoCancel: autoCancel ?? this.autoCancel,
    ongoing: ongoing ?? this.ongoing,
    silent: silent ?? this.silent,
    color: color ?? this.color,
    largeIcon: largeIcon ?? this.largeIcon,
    onlyAlertOnce: onlyAlertOnce ?? this.onlyAlertOnce,
    showWhen: showWhen ?? this.showWhen,
    when: when ?? this.when,
    usesChronometer: usesChronometer ?? this.usesChronometer,
    chronometerCountDown: chronometerCountDown ?? this.chronometerCountDown,
    channelShowBadge: channelShowBadge ?? this.channelShowBadge,
    showProgress: showProgress ?? this.showProgress,
    maxProgress: maxProgress ?? this.maxProgress,
    progress: progress ?? this.progress,
    indeterminate: indeterminate ?? this.indeterminate,
    channelAction: channelAction ?? this.channelAction,
    enableLights: enableLights ?? this.enableLights,
    ledColor: ledColor ?? this.ledColor,
    ledOnMs: ledOnMs ?? this.ledOnMs,
    ledOffMs: ledOffMs ?? this.ledOffMs,
    visibility: visibility ?? this.visibility,
    timeoutAfter: timeoutAfter ?? this.timeoutAfter,
    fullScreenIntent: fullScreenIntent ?? this.fullScreenIntent,
    shortcutId: shortcutId ?? this.shortcutId,
    additionalFlags: additionalFlags ?? this.additionalFlags,
    tag: tag ?? this.tag,
    actions: actions ?? this.actions,
    colorized: colorized ?? this.colorized,
    audioAttributesUsage: audioAttributesUsage ?? this.audioAttributesUsage,
  );
}