copyWith method

PhoneNumber copyWith({
  1. Country? country,
  2. String? nationalNumber,
  3. String? formattedNumber,
  4. bool? isValid,
})

Create new PhoneNumber instance by modifying

Implementation

PhoneNumber copyWith({
  Country? country,
  String? nationalNumber,
  String? formattedNumber,
  bool? isValid,
}) =>
    PhoneNumber._(
      country: country ?? this.country,
      nationalNumber: nationalNumber ?? this.nationalNumber,
      formattedNumber: formattedNumber ?? this.formattedNumber,
      isValid: isValid ?? this.isValid,
    );