StepData.newBoot constructor

StepData.newBoot(
  1. StepData stepData,
  2. StepCountWithTimestamp stepCount
)

Implementation

StepData.newBoot(StepData stepData, StepCountWithTimestamp stepCount)
    : previousDate = stepData.previousDate,
      previousStepCount = stepData.previousStepCount,
      todayDate = stepData.todayDate,
      todayStepCount = stepCount.stepsFromBoot,
      bootCount = stepCount.bootCount,
      stack = [...stepData.stack, stepData.todayStepCount],
      lastSavedAt = stepCount.timeStamp.toIso8601String(),
      previousStepCountSavedAt = stepData.previousStepCountSavedAt;