copyWithWrapped method
SleepModel
copyWithWrapped({
- Wrapped<
String> ? id, - Wrapped? averageBreath,
- Wrapped? averageHeartRate,
- Wrapped? averageHrv,
- Wrapped? awakeTime,
- Wrapped<
String> ? bedtimeEnd, - Wrapped<
String> ? bedtimeStart, - Wrapped<
DateTime> ? day, - Wrapped? deepSleepDuration,
- Wrapped? efficiency,
- Wrapped? heartRate,
- Wrapped? hrv,
- Wrapped? latency,
- Wrapped? lightSleepDuration,
- Wrapped<
bool> ? lowBatteryAlert, - Wrapped? lowestHeartRate,
- Wrapped? movement30Sec,
- Wrapped<
int> ? period, - Wrapped? readiness,
- Wrapped? readinessScoreDelta,
- Wrapped? remSleepDuration,
- Wrapped? restlessPeriods,
- Wrapped? sleepPhase5Min,
- Wrapped? sleepScoreDelta,
- Wrapped? sleepAlgorithmVersion,
- Wrapped<
int> ? timeInBed, - Wrapped? totalSleepDuration,
- 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));
}