lerp static method

AlertStyle? lerp(
  1. AlertStyle? a,
  2. AlertStyle? b,
  3. double t
)
override

Linearly interpolate between two AlertStyle objects.

Implementation

static AlertStyle? lerp(AlertStyle? a, AlertStyle? b, double t) {
  if (a == null && b == null) return null;
  return AlertStyle(
    variant: lerpEnum(a?.variant, b?.variant, t),
    severity: lerpEnum(a?.severity, b?.severity, t),
    margin: EdgeInsetsGeometry.lerp(a?.margin, b?.margin, t),
    padding: EdgeInsetsGeometry.lerp(a?.padding, b?.padding, t),
    clipBehavior: lerpEnum(a?.clipBehavior, b?.clipBehavior, t),
    shadowColor: Color.lerp(a?.shadowColor, b?.shadowColor, t),
    surfaceTint: Color.lerp(a?.surfaceTint, b?.surfaceTint, t),
    elevation: lerpDouble(a?.elevation, b?.elevation, t),
    foregroundStyle:
        TextStyle.lerp(a?.foregroundStyle, b?.foregroundStyle, t),
    foregroundColor: Color.lerp(a?.foregroundColor, b?.foregroundColor, t),
    foregroundOpacity:
        lerpDouble(a?.foregroundOpacity, b?.foregroundOpacity, t),
    foregroundAlpha: lerpInt(a?.foregroundAlpha, b?.foregroundAlpha, t),
    foregroundSpacing:
        lerpDouble(a?.foregroundSpacing, b?.foregroundSpacing, t),
    foregroundLoosen: lerpBool(a?.foregroundLoosen, b?.foregroundLoosen, t),
    foregroundExpanded:
        lerpBool(a?.foregroundExpanded, b?.foregroundExpanded, t),
    foregroundAlign: lerpEnum(a?.foregroundAlign, b?.foregroundAlign, t),
    foregroundJustify:
        lerpEnum(a?.foregroundJustify, b?.foregroundJustify, t),
    backgroundColor: Color.lerp(a?.backgroundColor, b?.backgroundColor, t),
    backgroundOpacity:
        lerpDouble(a?.backgroundOpacity, b?.backgroundOpacity, t),
    backgroundAlpha: lerpInt(a?.backgroundAlpha, b?.backgroundAlpha, t),
    borderColor: Color.lerp(a?.borderColor, b?.backgroundColor, t),
    borderOpacity: lerpDouble(a?.borderOpacity, b?.borderOpacity, t),
    borderAlpha: lerpInt(a?.borderAlpha, b?.borderAlpha, t),
    borderWidth: lerpDouble(a?.borderWidth, b?.borderWidth, t),
    borderRadius: BorderRadius.lerp(a?.borderRadius, b?.borderRadius, t),
    borderStyle: lerpEnum(a?.borderStyle, b?.borderStyle, t),
    iconColor: Color.lerp(a?.iconColor, b?.iconColor, t),
    iconOpacity: lerpDouble(a?.iconOpacity, b?.iconOpacity, t),
    iconSize: lerpDouble(a?.iconSize, b?.iconSize, t),
  );
}