copyWith method
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
Contact copyWith({
String? phoneNumber,
String? firstName,
String? lastName,
String? vcard,
int? userId,
}) =>
Contact(
phoneNumber: phoneNumber ?? this.phoneNumber,
firstName: firstName ?? this.firstName,
lastName: lastName ?? this.lastName,
vcard: vcard ?? this.vcard,
userId: userId ?? this.userId,
);