copyWith method

NotificationPayload copyWith({
  1. int? id,
  2. String? title,
  3. String? body,
  4. String? channelId,
  5. Map<String, dynamic>? data,
  6. String? soundName,
  7. bool? silent,
})

Returns a copy with the supplied non-null fields replaced.

Passing null keeps the current value, including nullable fields.

Implementation

NotificationPayload copyWith({
  int? id,
  String? title,
  String? body,
  String? channelId,
  Map<String, dynamic>? data,
  String? soundName,
  bool? silent,
}) => NotificationPayload(
  id: id ?? this.id,
  title: title ?? this.title,
  body: body ?? this.body,
  channelId: channelId ?? this.channelId,
  data: data ?? this.data,
  soundName: soundName ?? this.soundName,
  silent: silent ?? this.silent,
);