lerp method

  1. @useResult
FTileContentStyle lerp(
  1. FTileContentStyle other,
  2. double t
)

Linearly interpolate between this and another FTileContentStyle using the given factor t.

Implementation

@useResult
FTileContentStyle lerp(FTileContentStyle other, double t) => .new(
  prefixIconStyle: .lerpIconThemeData(prefixIconStyle, other.prefixIconStyle, t),
  titleTextStyle: .lerpTextStyle(titleTextStyle, other.titleTextStyle, t),
  subtitleTextStyle: .lerpTextStyle(subtitleTextStyle, other.subtitleTextStyle, t),
  detailsTextStyle: .lerpTextStyle(detailsTextStyle, other.detailsTextStyle, t),
  suffixIconStyle: .lerpIconThemeData(suffixIconStyle, other.suffixIconStyle, t),
  suffixedPadding: .lerp(suffixedPadding, other.suffixedPadding, t) ?? suffixedPadding,
  unsuffixedPadding: .lerp(unsuffixedPadding, other.unsuffixedPadding, t) ?? unsuffixedPadding,
  titleSoftWrap: t < 0.5 ? titleSoftWrap : other.titleSoftWrap,
  titleOverflow: t < 0.5 ? titleOverflow : other.titleOverflow,
  titleMaxLines: t < 0.5 ? titleMaxLines : other.titleMaxLines,
  titleTextHeightBehavior: t < 0.5 ? titleTextHeightBehavior : other.titleTextHeightBehavior,
  subtitleSoftWrap: t < 0.5 ? subtitleSoftWrap : other.subtitleSoftWrap,
  subtitleOverflow: t < 0.5 ? subtitleOverflow : other.subtitleOverflow,
  subtitleMaxLines: t < 0.5 ? subtitleMaxLines : other.subtitleMaxLines,
  subtitleTextHeightBehavior: t < 0.5 ? subtitleTextHeightBehavior : other.subtitleTextHeightBehavior,
  prefixIconSpacing: lerpDouble(prefixIconSpacing, other.prefixIconSpacing, t) ?? prefixIconSpacing,
  titleSpacing: lerpDouble(titleSpacing, other.titleSpacing, t) ?? titleSpacing,
  middleSpacing: lerpDouble(middleSpacing, other.middleSpacing, t) ?? middleSpacing,
  suffixIconSpacing: lerpDouble(suffixIconSpacing, other.suffixIconSpacing, t) ?? suffixIconSpacing,
);