copyWith method

AndroidNotificationOptions copyWith({
  1. String? channelId,
  2. String? channelName,
  3. String? channelDescription,
  4. NotificationChannelImportance? channelImportance,
  5. NotificationPriority? priority,
  6. bool? enableVibration,
  7. bool? playSound,
  8. bool? showWhen,
  9. bool? showBadge,
  10. bool? onlyAlertOnce,
  11. NotificationVisibility? visibility,
})

Creates a copy of the object replaced with new values.

Implementation

AndroidNotificationOptions copyWith({
  String? channelId,
  String? channelName,
  String? channelDescription,
  NotificationChannelImportance? channelImportance,
  NotificationPriority? priority,
  bool? enableVibration,
  bool? playSound,
  bool? showWhen,
  bool? showBadge,
  bool? onlyAlertOnce,
  NotificationVisibility? visibility,
}) =>
    AndroidNotificationOptions(
      channelId: channelId ?? this.channelId,
      channelName: channelName ?? this.channelName,
      channelDescription: channelDescription ?? this.channelDescription,
      channelImportance: channelImportance ?? this.channelImportance,
      priority: priority ?? this.priority,
      enableVibration: enableVibration ?? this.enableVibration,
      playSound: playSound ?? this.playSound,
      showWhen: showWhen ?? this.showWhen,
      showBadge: showBadge ?? this.showBadge,
      onlyAlertOnce: onlyAlertOnce ?? this.onlyAlertOnce,
      visibility: visibility ?? this.visibility,
    );