copyWith method

EntranceInfo copyWith({
  1. DgisObjectId? id,
  2. Optional<String?>? buildingNumber,
  3. Optional<String?>? porchName,
  4. Optional<String?>? porchNumber,
  5. List<ApartmentRange>? apartmentRanges,
  6. Optional<EntranceGeometry?>? geometry,
})

Implementation

EntranceInfo copyWith({
  DgisObjectId? id,
  Optional<String?>? buildingNumber,
  Optional<String?>? porchName,
  Optional<String?>? porchNumber,
  List<ApartmentRange>? apartmentRanges,
  Optional<EntranceGeometry?>? geometry
}) {
  return EntranceInfo(
    id: id ?? this.id,
    buildingNumber: buildingNumber != null ? buildingNumber.value : this.buildingNumber,
    porchName: porchName != null ? porchName.value : this.porchName,
    porchNumber: porchNumber != null ? porchNumber.value : this.porchNumber,
    apartmentRanges: apartmentRanges ?? this.apartmentRanges,
    geometry: geometry != null ? geometry.value : this.geometry
  );
}