copyWith method

NotificationData copyWith({
  1. String? title,
  2. String? body,
  3. PushNotificationPayload? payload,
  4. String? linkMobile,
})

Creates a copy of this notification data with the given fields replaced

Implementation

NotificationData copyWith({
  String? title,
  String? body,
  PushNotificationPayload? payload,
  String? linkMobile,
}) {
  return NotificationData(
    title: title ?? this.title,
    body: body ?? this.body,
    payload: payload ?? this.payload,
    linkMobile: linkMobile ?? this.linkMobile,
  );
}