copyWith method

ImportedContact copyWith({
  1. String? phoneNumber,
  2. String? firstName,
  3. String? lastName,
  4. FormattedText? note()?,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

ImportedContact copyWith({
  String? phoneNumber,
  String? firstName,
  String? lastName,
  FormattedText? Function()? note,
}) => ImportedContact(
  phoneNumber: phoneNumber ?? this.phoneNumber,
  firstName: firstName ?? this.firstName,
  lastName: lastName ?? this.lastName,
  note: note != null ? note() : this.note,
);