lerp method

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

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

Implementation

@useResult
FTileStyle lerp(FTileStyle other, double t) => FTileStyle(
  backgroundColor: FWidgetStateMap.lerpWhere(backgroundColor, other.backgroundColor, t, Color.lerp),
  margin: EdgeInsetsGeometry.lerp(margin, other.margin, t) ?? margin,
  decoration: FWidgetStateMap.lerpWhere(decoration, other.decoration, t, BoxDecoration.lerp),
  contentStyle: contentStyle.lerp(other.contentStyle, t),
  rawItemContentStyle: rawItemContentStyle.lerp(other.rawItemContentStyle, t),
  tappableStyle: tappableStyle.lerp(other.tappableStyle, t),
  focusedOutlineStyle: t < 0.5 ? focusedOutlineStyle : other.focusedOutlineStyle,
);