mergeBackground method

void mergeBackground(
  1. ScenarioStatus other, {
  2. dynamic isFirst = true,
})

Implementation

void mergeBackground(ScenarioStatus other, {isFirst = true}) {
  if (other.scenario is _Background) {
    background = other.scenario as _Background?;
    passedSteps.addAll(other.passedSteps);
    failedSteps.addAll(other.failedSteps);
    undefinedSteps.addAll(other.undefinedSteps);
//      if (isFirst) {
    // If we write to background within the worker task
    // the others don't have the updated value,
    // so we use the parameter isFirst.
    // background.bufferIsMerged = true;
//        buffer.merge(other.buffer);
//      }
  } else {
    throw Exception("$other is not a Background");
  }
}