copyWithWrapped method

SessionModel copyWithWrapped({
  1. Wrapped<String>? id,
  2. Wrapped<DateTime>? day,
  3. Wrapped<String>? startDatetime,
  4. Wrapped<String>? endDatetime,
  5. Wrapped<MomentType>? type,
  6. Wrapped? heartRate,
  7. Wrapped? heartRateVariability,
  8. Wrapped? mood,
  9. Wrapped? motionCount,
})

Implementation

SessionModel copyWithWrapped(
    {Wrapped<String>? id,
    Wrapped<DateTime>? day,
    Wrapped<String>? startDatetime,
    Wrapped<String>? endDatetime,
    Wrapped<enums.MomentType>? type,
    Wrapped<dynamic>? heartRate,
    Wrapped<dynamic>? heartRateVariability,
    Wrapped<dynamic>? mood,
    Wrapped<dynamic>? motionCount}) {
  return SessionModel(
      id: (id != null ? id.value : this.id),
      day: (day != null ? day.value : this.day),
      startDatetime:
          (startDatetime != null ? startDatetime.value : this.startDatetime),
      endDatetime:
          (endDatetime != null ? endDatetime.value : this.endDatetime),
      type: (type != null ? type.value : this.type),
      heartRate: (heartRate != null ? heartRate.value : this.heartRate),
      heartRateVariability: (heartRateVariability != null
          ? heartRateVariability.value
          : this.heartRateVariability),
      mood: (mood != null ? mood.value : this.mood),
      motionCount:
          (motionCount != null ? motionCount.value : this.motionCount));
}