copyWith method

  1. @useResult
Contact copyWith({
  1. String? identifier,
  2. String? displayName,
  3. String? givenName,
  4. String? middleName,
  5. String? prefix,
  6. String? suffix,
  7. String? familyName,
  8. String? company,
  9. String? jobTitle,
  10. String? androidAccountTypeRaw,
  11. String? androidAccountName,
  12. AndroidAccountType? androidAccountType,
  13. List<Contact$Field>? emails,
  14. List<Contact$Field>? phones,
  15. List<Contact$PostalAddress>? postalAddresses,
  16. Uint8List? avatar,
  17. DateTime? birthday,
})

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

Implementation

@useResult
Contact copyWith({
  String? identifier,
  String? displayName,
  String? givenName,
  String? middleName,
  String? prefix,
  String? suffix,
  String? familyName,
  String? company,
  String? jobTitle,
  String? androidAccountTypeRaw,
  String? androidAccountName,
  AndroidAccountType? androidAccountType,
  List<Contact$Field>? emails,
  List<Contact$Field>? phones,
  List<Contact$PostalAddress>? postalAddresses,
  Uint8List? avatar,
  DateTime? birthday,
}) =>
    Contact(
      identifier: identifier ?? this.identifier,
      displayName: displayName ?? this.displayName,
      givenName: givenName ?? this.givenName,
      middleName: middleName ?? this.middleName,
      prefix: prefix ?? this.prefix,
      suffix: suffix ?? this.suffix,
      familyName: familyName ?? this.familyName,
      company: company ?? this.company,
      jobTitle: jobTitle ?? this.jobTitle,
      androidAccountTypeRaw:
          androidAccountTypeRaw ?? this.androidAccountTypeRaw,
      androidAccountName: androidAccountName ?? this.androidAccountName,
      androidAccountType: androidAccountType ?? this.androidAccountType,
      emails: emails ?? this.emails,
      phones: phones ?? this.phones,
      postalAddresses: postalAddresses ?? this.postalAddresses,
      avatar: avatar ?? this.avatar,
      birthday: birthday ?? this.birthday,
    );