Contact constructor

Contact({
  1. String id = '',
  2. String displayName = '',
  3. Uint8List? thumbnail,
  4. Uint8List? photo,
  5. bool isStarred = false,
  6. Name? name,
  7. List<Phone>? phones,
  8. List<Email>? emails,
  9. List<Address>? addresses,
  10. List<Organization>? organizations,
  11. List<Website>? websites,
})

Implementation

Contact({
  this.id = '',
  this.displayName = '',
  this.thumbnail,
  this.photo,
  this.isStarred = false,
  Name? name,
  List<Phone>? phones,
  List<Email>? emails,
  List<Address>? addresses,
  List<Organization>? organizations,
  List<Website>? websites,
})  : name = name ?? Name(),
      phones = phones ?? <Phone>[],
      emails = emails ?? <Email>[],
      addresses = addresses ?? <Address>[],
      organizations = organizations ?? <Organization>[],
      organization = organizations != null && organizations.isNotEmpty
          ? organizations[0]
          : null,
      websites = websites ?? <Website>[];