merge method

StepStyle merge(
  1. StepStyle? stepStyle
)

Returns a copy of this StepStyle where the non-null fields in stepStyle have replaced the corresponding null fields in this StepStyle.

In other words, stepStyle is used to fill in unspecified (null) fields this StepStyle.

Implementation

StepStyle merge(StepStyle? stepStyle) {
  if (stepStyle == null) {
    return this;
  }
  return copyWith(
    color: stepStyle.color,
    errorColor: stepStyle.errorColor,
    connectorColor: stepStyle.connectorColor,
    connectorThickness: stepStyle.connectorThickness,
    border: stepStyle.border,
    boxShadow: stepStyle.boxShadow,
    gradient: stepStyle.gradient,
    indexStyle: stepStyle.indexStyle,
  );
}