initLot method

PerfTestOne initLot(
  1. PerfTestLot? newLot
)

Initialize parent property with newLot as well as initialize convenience properties depending on that

Implementation

PerfTestOne initLot(PerfTestLot? newLot) {
  lot = newLot;

  if (newLot != null) {
    format = newLot.format;
    isMyStopwatch = newLot.isMyStopwatch;
    isOutLaps = newLot.isOutLaps;

    if (newLot.stopwatch != null) {
      stopwatch = newLot.stopwatch!;
    }
  }

  return this;
}