copyWith method
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,
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,
);
}