copyWith method

ServerNotificationModel copyWith({
  1. String? uuid,
  2. String? notifiableType,
  3. int? notifiableId,
  4. String? authableType,
  5. int? authableId,
  6. String? code,
  7. String? body,
  8. String? title,
  9. Map<String, dynamic>? data,
  10. String? senderName,
  11. String? senderImage,
  12. DateTime? readAt,
  13. DateTime? createdAt,
})

Implementation

ServerNotificationModel copyWith({
  String? uuid,
  String? notifiableType,
  int? notifiableId,
  String? authableType,
  int? authableId,
  String? code,
  String? body,
  String? title,
  Map<String, dynamic>? data,
  String? senderName,
  String? senderImage,
  DateTime? readAt,
  DateTime? createdAt,
}) {
  return ServerNotificationModel(
    uuid: uuid ?? this.uuid,
    notifiableType: notifiableType ?? this.notifiableType,
    notifiableId: notifiableId ?? this.notifiableId,
    authableType: authableType ?? this.authableType,
    authableId: authableId ?? this.authableId,
    code: code ?? this.code,
    body: body ?? this.body,
    data: data ?? this.data,
    title: title ?? this.title,
    senderName: senderName ?? this.senderName,
    senderImage: senderImage ?? this.senderImage,
    readAt: readAt ?? this.readAt,
    createdAt: createdAt ?? this.createdAt,
  );
}