copyWithWrapped method

SleepModel copyWithWrapped({
  1. Wrapped<String>? id,
  2. Wrapped? averageBreath,
  3. Wrapped? averageHeartRate,
  4. Wrapped? averageHrv,
  5. Wrapped? awakeTime,
  6. Wrapped<String>? bedtimeEnd,
  7. Wrapped<String>? bedtimeStart,
  8. Wrapped<DateTime>? day,
  9. Wrapped? deepSleepDuration,
  10. Wrapped? efficiency,
  11. Wrapped? heartRate,
  12. Wrapped? hrv,
  13. Wrapped? latency,
  14. Wrapped? lightSleepDuration,
  15. Wrapped<bool>? lowBatteryAlert,
  16. Wrapped? lowestHeartRate,
  17. Wrapped? movement30Sec,
  18. Wrapped<int>? period,
  19. Wrapped? readiness,
  20. Wrapped? readinessScoreDelta,
  21. Wrapped? remSleepDuration,
  22. Wrapped? restlessPeriods,
  23. Wrapped? sleepPhase5Min,
  24. Wrapped? sleepScoreDelta,
  25. Wrapped? sleepAlgorithmVersion,
  26. Wrapped<int>? timeInBed,
  27. Wrapped? totalSleepDuration,
  28. Wrapped<SleepType>? type,
})

Implementation

SleepModel copyWithWrapped(
    {Wrapped<String>? id,
    Wrapped<dynamic>? averageBreath,
    Wrapped<dynamic>? averageHeartRate,
    Wrapped<dynamic>? averageHrv,
    Wrapped<dynamic>? awakeTime,
    Wrapped<String>? bedtimeEnd,
    Wrapped<String>? bedtimeStart,
    Wrapped<DateTime>? day,
    Wrapped<dynamic>? deepSleepDuration,
    Wrapped<dynamic>? efficiency,
    Wrapped<dynamic>? heartRate,
    Wrapped<dynamic>? hrv,
    Wrapped<dynamic>? latency,
    Wrapped<dynamic>? lightSleepDuration,
    Wrapped<bool>? lowBatteryAlert,
    Wrapped<dynamic>? lowestHeartRate,
    Wrapped<dynamic>? movement30Sec,
    Wrapped<int>? period,
    Wrapped<dynamic>? readiness,
    Wrapped<dynamic>? readinessScoreDelta,
    Wrapped<dynamic>? remSleepDuration,
    Wrapped<dynamic>? restlessPeriods,
    Wrapped<dynamic>? sleepPhase5Min,
    Wrapped<dynamic>? sleepScoreDelta,
    Wrapped<dynamic>? sleepAlgorithmVersion,
    Wrapped<int>? timeInBed,
    Wrapped<dynamic>? totalSleepDuration,
    Wrapped<enums.SleepType>? type}) {
  return SleepModel(
      id: (id != null ? id.value : this.id),
      averageBreath:
          (averageBreath != null ? averageBreath.value : this.averageBreath),
      averageHeartRate: (averageHeartRate != null
          ? averageHeartRate.value
          : this.averageHeartRate),
      averageHrv: (averageHrv != null ? averageHrv.value : this.averageHrv),
      awakeTime: (awakeTime != null ? awakeTime.value : this.awakeTime),
      bedtimeEnd: (bedtimeEnd != null ? bedtimeEnd.value : this.bedtimeEnd),
      bedtimeStart:
          (bedtimeStart != null ? bedtimeStart.value : this.bedtimeStart),
      day: (day != null ? day.value : this.day),
      deepSleepDuration: (deepSleepDuration != null
          ? deepSleepDuration.value
          : this.deepSleepDuration),
      efficiency: (efficiency != null ? efficiency.value : this.efficiency),
      heartRate: (heartRate != null ? heartRate.value : this.heartRate),
      hrv: (hrv != null ? hrv.value : this.hrv),
      latency: (latency != null ? latency.value : this.latency),
      lightSleepDuration: (lightSleepDuration != null
          ? lightSleepDuration.value
          : this.lightSleepDuration),
      lowBatteryAlert: (lowBatteryAlert != null
          ? lowBatteryAlert.value
          : this.lowBatteryAlert),
      lowestHeartRate: (lowestHeartRate != null
          ? lowestHeartRate.value
          : this.lowestHeartRate),
      movement30Sec:
          (movement30Sec != null ? movement30Sec.value : this.movement30Sec),
      period: (period != null ? period.value : this.period),
      readiness: (readiness != null ? readiness.value : this.readiness),
      readinessScoreDelta: (readinessScoreDelta != null
          ? readinessScoreDelta.value
          : this.readinessScoreDelta),
      remSleepDuration: (remSleepDuration != null
          ? remSleepDuration.value
          : this.remSleepDuration),
      restlessPeriods: (restlessPeriods != null
          ? restlessPeriods.value
          : this.restlessPeriods),
      sleepPhase5Min: (sleepPhase5Min != null
          ? sleepPhase5Min.value
          : this.sleepPhase5Min),
      sleepScoreDelta: (sleepScoreDelta != null
          ? sleepScoreDelta.value
          : this.sleepScoreDelta),
      sleepAlgorithmVersion: (sleepAlgorithmVersion != null
          ? sleepAlgorithmVersion.value
          : this.sleepAlgorithmVersion),
      timeInBed: (timeInBed != null ? timeInBed.value : this.timeInBed),
      totalSleepDuration: (totalSleepDuration != null
          ? totalSleepDuration.value
          : this.totalSleepDuration),
      type: (type != null ? type.value : this.type));
}