lerp static method

Linearly interpolate between two WxListTileStyle objects.

Implementation

static WxListTileStyle? lerp(
  WxListTileStyle? a,
  WxListTileStyle? b,
  double t,
) {
  if (a == null && b == null) return null;
  return WxListTileStyle(
    margin: EdgeInsetsGeometry.lerp(a?.margin, b?.margin, t),
    padding: EdgeInsetsGeometry.lerp(a?.padding, b?.padding, t),
    spacing: lerpDouble(a?.spacing, b?.spacing, t),
    adaptiveSpacing: lerpBool(a?.adaptiveSpacing, b?.adaptiveSpacing, t),
    align: lerpEnum(a?.align, b?.align, t),
    justify: lerpEnum(a?.justify, b?.justify, t),
    inline: lerpBool(a?.inline, b?.inline, t),
    textWrap: lerpBool(a?.textWrap, b?.textWrap, t),
    textAlign: lerpEnum(a?.textAlign, b?.textAlign, t),
    textSpacing: lerpDouble(a?.textSpacing, b?.textSpacing, t),
    textColor: Color.lerp(a?.textColor, b?.textColor, t),
    textOverflow: lerpEnum(a?.textOverflow, b?.textOverflow, t),
    textSoftWrap: lerpEnum(a?.textSoftWrap, b?.textSoftWrap, t),
    textWidthBasis: lerpEnum(a?.textWidthBasis, b?.textWidthBasis, t),
    iconColor: Color.lerp(a?.iconColor, b?.iconColor, t),
    iconOpacity: lerpDouble(a?.iconOpacity, b?.iconOpacity, t),
    iconSize: lerpDouble(a?.iconSize, b?.iconSize, t),
    titleStyle: TextStyle.lerp(a?.titleStyle, b?.titleStyle, t),
    subtitleStyle: TextStyle.lerp(a?.subtitleStyle, b?.subtitleStyle, t),
    secondaryStyle: TextStyle.lerp(a?.secondaryStyle, b?.secondaryStyle, t),
    titleSize: lerpDouble(a?.titleSize, b?.titleSize, t),
    subtitleSize: lerpDouble(a?.subtitleSize, b?.subtitleSize, t),
    titleColor: Color.lerp(a?.titleColor, b?.titleColor, t),
    subtitleColor: Color.lerp(a?.subtitleColor, b?.subtitleColor, t),
    titleMaxLines: lerpInt(a?.titleMaxLines, b?.titleMaxLines, t),
    subtitleMaxLines: lerpInt(a?.subtitleMaxLines, b?.subtitleMaxLines, t),
    titleWeight: FontWeight.lerp(a?.titleWeight, b?.titleWeight, t),
    subtitleWeight: FontWeight.lerp(a?.subtitleWeight, b?.subtitleWeight, t),
  );
}