TableBorder lerp(TableBorder a, TableBorder b, double t)

Linearly interpolate between two table borders.

Source

static TableBorder lerp(TableBorder a, TableBorder b, double t) {
  if (a == null && b == null)
    return null;
  if (a == null)
    return b.scale(t);
  if (b == null)
    return a.scale(1.0 - t);
  return new TableBorder(
    top: BorderSide.lerp(a.top, b.top, t),
    right: BorderSide.lerp(a.right, b.right, t),
    bottom: BorderSide.lerp(a.bottom, b.bottom, t),
    left: BorderSide.lerp(a.left, b.left, t),
    horizontalInside: BorderSide.lerp(a.horizontalInside, b.horizontalInside, t),
    verticalInside: BorderSide.lerp(a.verticalInside, b.verticalInside, t)
  );
}