lerp static method

Linearly interpolate between two WxTextTileStyle objects.

Implementation

static WxTextTileStyle? lerp(
  WxTextTileStyle? a,
  WxTextTileStyle? b,
  double t,
) {
  if (a == null && b == null) return null;
  return WxTextTileStyle(
    spacing: lerpDouble(a?.spacing, b?.spacing, t),
    margin: EdgeInsetsGeometry.lerp(a?.margin, b?.margin, t),
    align: lerpEnum(a?.align, b?.align, t),
    color: Color.lerp(a?.color, b?.color, t),
    overflow: lerpEnum(a?.overflow, b?.overflow, t),
    softWrap: lerpEnum(a?.softWrap, b?.softWrap, t),
    widthBasis: lerpEnum(a?.widthBasis, b?.widthBasis, t),
    titleStyle: TextStyle.lerp(a?.titleStyle, b?.titleStyle, t),
    titleColor: Color.lerp(a?.titleColor, b?.titleColor, t),
    titleWeight: FontWeight.lerp(a?.titleWeight, b?.titleWeight, t),
    titleSize: lerpDouble(a?.titleSize, b?.titleSize, t),
    titleMaxLines: lerpInt(a?.titleMaxLines, b?.titleMaxLines, t),
    subtitleStyle: TextStyle.lerp(a?.subtitleStyle, b?.subtitleStyle, t),
    subtitleColor: Color.lerp(a?.subtitleColor, b?.subtitleColor, t),
    subtitleWeight: FontWeight.lerp(a?.subtitleWeight, b?.subtitleWeight, t),
    subtitleSize: lerpDouble(a?.subtitleSize, b?.subtitleSize, t),
    subtitleMaxLines: lerpInt(a?.subtitleMaxLines, b?.subtitleMaxLines, t),
  );
}