copyWith method

HomeDTO copyWith({
  1. int? id,
  2. String? name,
  3. WeatherConditionDTO? weatherCondition,
  4. double? weatherTempF,
  5. WeatherTimePeriodDTO? weatherTimePeriod,
  6. AddressDTO? address,
  7. List<DeviceDTO>? devices,
  8. List<HomeUserDTO>? users,
})

Implementation

HomeDTO copyWith(
    {int? id,
    String? name,
    enums.WeatherConditionDTO? weatherCondition,
    double? weatherTempF,
    enums.WeatherTimePeriodDTO? weatherTimePeriod,
    AddressDTO? address,
    List<DeviceDTO>? devices,
    List<HomeUserDTO>? users}) {
  return HomeDTO(
      id: id ?? this.id,
      name: name ?? this.name,
      weatherCondition: weatherCondition ?? this.weatherCondition,
      weatherTempF: weatherTempF ?? this.weatherTempF,
      weatherTimePeriod: weatherTimePeriod ?? this.weatherTimePeriod,
      address: address ?? this.address,
      devices: devices ?? this.devices,
      users: users ?? this.users);
}