lerp static method

Implementation

static LoadingOverlayStyle lerp(
  LoadingOverlayStyle? a,
  LoadingOverlayStyle? b,
  double t,
) {
  if (a == null && b == null) return LoadingOverlayStyle();
  return LoadingOverlayStyle(
    loadingColor: Color.lerp(a?.loadingColor, b?.loadingColor, t),
    backgroundColor: Color.lerp(a?.backgroundColor, b?.backgroundColor, t),
    loadingSize: lerpDouble(a?.loadingSize, b?.loadingSize, t) ?? 48,
    loadingIndex: t < 0.5 ? a?.loadingIndex ?? -1 : b?.loadingIndex ?? -1,
    borderRadius:
        BorderRadius.lerp(a?.borderRadius, b?.borderRadius, t) ??
        const BorderRadius.all(Radius.circular(14)),
    constraints:
        BoxConstraints.lerp(a?.constraints, b?.constraints, t) ??
        const BoxConstraints.tightFor(width: 80, height: 80),
    hintStyle: TextStyle.lerp(a?.hintStyle, b?.hintStyle, t),
    space: lerpDouble(a?.space, b?.space, t) ?? 14,
    hintMaxLines: b?.hintMaxLines ?? 1,
  );
}