copyWith method

PhoneNumber copyWith({
  1. Country? country,
  2. String? number,
})

Creates a copy of this PhoneNumber with the given fields replaced.

Implementation

PhoneNumber copyWith({Country? country, String? number}) {
  return PhoneNumber(country ?? this.country, number ?? this.number);
}