copyWith method

CustomerAttributes copyWith({
  1. String? displayName,
  2. String? firstName,
  3. String? lastName,
  4. String? email,
  5. String? gender,
  6. String? mobile,
  7. String? dateOfBirth,
  8. String? joinDate,
  9. String? preferredLanguage,
  10. Map<String, String>? customAttributes,
  11. Map<String, String>? additionalAttributes,
})

Creates a copy with updated values.

Implementation

CustomerAttributes copyWith({
  String? displayName,
  String? firstName,
  String? lastName,
  String? email,
  String? gender,
  String? mobile,
  String? dateOfBirth,
  String? joinDate,
  String? preferredLanguage,
  Map<String, String>? customAttributes,
  Map<String, String>? additionalAttributes,
}) {
  return CustomerAttributes._(
    displayName: displayName ?? this.displayName,
    firstName: firstName ?? this.firstName,
    lastName: lastName ?? this.lastName,
    email: email ?? this.email,
    gender: gender ?? this.gender,
    mobile: mobile ?? this.mobile,
    dateOfBirth: dateOfBirth ?? this.dateOfBirth,
    joinDate: joinDate ?? this.joinDate,
    preferredLanguage: preferredLanguage ?? this.preferredLanguage,
    customAttributes: customAttributes ?? this.customAttributes,
    additionalAttributes: additionalAttributes ?? this.additionalAttributes,
  );
}