copyWith method

Contact copyWith({
  1. String? id,
  2. String? creatorId,
  3. String? organizationId,
  4. String? name,
  5. String? phone,
  6. DateTime? createdAt,
  7. DateTime? updatedAt,
})

Implementation

Contact copyWith({
  String? id,
  String? creatorId,
  String? organizationId,
  String? name,
  String? phone,
  DateTime? createdAt,
  DateTime? updatedAt,
}) {
  return Contact(
    id: id ?? this.id,
    creatorId: creatorId ?? this.creatorId,
    organizationId: organizationId ?? this.organizationId,
    name: name ?? this.name,
    phone: phone ?? this.phone,
    createdAt: createdAt ?? this.createdAt,
    updatedAt: updatedAt ?? this.updatedAt,
  );
}