copyWith method

ContactPhone copyWith({
  1. String? number,
  2. PhoneLabel? label,
  3. String? customLabel,
  4. bool? isPrimary,
})

Creates a copy of this contact phone with the given fields replaced with new values

Implementation

ContactPhone copyWith({
  String? number,
  PhoneLabel? label,
  String? customLabel,
  bool? isPrimary,
}) {
  return ContactPhone(
    number: number ?? this.number,
    label: label ?? this.label,
    customLabel: customLabel ?? this.customLabel,
    isPrimary: isPrimary ?? this.isPrimary,
  );
}