copyWith method

NotificationAction copyWith({
  1. String? id,
  2. String? title,
  3. String? titleColor,
  4. String? icon,
  5. List<NotificationActionInput>? inputs,
  6. bool? contextual,
  7. bool? authenticationRequired,
  8. bool? destructive,
  9. bool? showsUserInterface,
  10. bool? allowInBackground,
  11. String? payload,
})

Creates a copy of this action with the given fields replaced.

Implementation

NotificationAction copyWith({
  String? id,
  String? title,
  String? titleColor,
  String? icon,
  List<NotificationActionInput>? inputs,
  bool? contextual,
  bool? authenticationRequired,
  bool? destructive,
  bool? showsUserInterface,
  bool? allowInBackground,
  String? payload,
}) {
  return NotificationAction(
    id: id ?? this.id,
    title: title ?? this.title,
    titleColor: titleColor ?? this.titleColor,
    icon: icon ?? this.icon,
    inputs: inputs ?? this.inputs,
    contextual: contextual ?? this.contextual,
    authenticationRequired:
        authenticationRequired ?? this.authenticationRequired,
    destructive: destructive ?? this.destructive,
    showsUserInterface: showsUserInterface ?? this.showsUserInterface,
    allowInBackground: allowInBackground ?? this.allowInBackground,
    payload: payload ?? this.payload,
  );
}