Decoration lerp(Decoration begin, Decoration end, double t)

Linearly interpolates from begin to end.

This defers to end's lerpTo function if end is not null, otherwise it uses begin's lerpFrom function.

Source

static Decoration lerp(Decoration begin, Decoration end, double t) {
  if (end != null)
    return end.lerpFrom(begin, t);
  if (begin != null)
    return begin.lerpTo(end, t);
  return null;
}