lerp static method

Linearly interpolate between two WxAnchorStyle objects.

Implementation

static WxAnchorStyle? lerp(WxAnchorStyle? a, WxAnchorStyle? b, double t) {
  if (a == null && b == null) return null;
  return WxAnchorStyle(
    margin: EdgeInsetsGeometry.lerp(a?.margin, b?.margin, t),
    padding: EdgeInsetsGeometry.lerp(a?.padding, b?.padding, t),
    scale: lerpDouble(a?.scale, b?.scale, t),
    opacity: lerpDouble(a?.opacity, b?.opacity, t),
    overlayShape: ShapeBorder.lerp(a?.overlayShape, b?.overlayShape, t),
    overlayColor: Color.lerp(a?.overlayColor, b?.overlayColor, t),
    overlayOpacity: lerpDouble(a?.overlayOpacity, b?.overlayOpacity, t),
    overlayExtent: Size.lerp(a?.overlayExtent, b?.overlayExtent, t),
    textColor: Color.lerp(a?.textColor, b?.textColor, t),
    textStyle: TextStyle.lerp(a?.textStyle, b?.textStyle, t),
    textAlign: lerpEnum(a?.textAlign, b?.textAlign, t),
    iconColor: Color.lerp(a?.iconColor, b?.iconColor, t),
    iconOpacity: lerpDouble(a?.iconOpacity, b?.iconOpacity, t),
    iconSize: lerpDouble(a?.iconSize, b?.iconSize, t),
  );
}