copyWith method

ContactEmail copyWith({
  1. String? address,
  2. EmailLabel? label,
  3. String? customLabel,
  4. bool? isPrimary,
})

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

Implementation

ContactEmail copyWith({
  String? address,
  EmailLabel? label,
  String? customLabel,
  bool? isPrimary,
}) {
  return ContactEmail(
    address: address ?? this.address,
    label: label ?? this.label,
    customLabel: customLabel ?? this.customLabel,
    isPrimary: isPrimary ?? this.isPrimary,
  );
}