Contact constructor

Contact({
  1. required String address,
  2. String? firstName,
  3. String? lastName,
  4. String? fullName,
  5. Photo? thumbnail,
  6. Photo? photo,
})

Implementation

Contact({
  required String address,
  String? firstName,
  String? lastName,
  String? fullName,
  Photo? thumbnail,
  Photo? photo,
}) : _address = address {
  this._firstName = firstName;
  this._lastName = lastName;
  assert(_fullName != null || _firstName != null && _lastName != null);
  if (fullName == null) {
    this._fullName = _firstName! + " " + _lastName!;
  } else {
    this._fullName = fullName;
  }
  this._thumbnail = thumbnail;
  this._photo = photo;
}