lerp static method

Linearly interpolate between two tooltip themes.

All the properties must be non-null.

Implementation

static MacosTooltipThemeData lerp(
  MacosTooltipThemeData a,
  MacosTooltipThemeData b,
  double t,
) {
  return MacosTooltipThemeData(
    decoration: Decoration.lerp(a.decoration, b.decoration, t),
    height: t < 0.5 ? a.height : b.height,
    margin: EdgeInsetsGeometry.lerp(a.margin, b.margin, t),
    padding: EdgeInsetsGeometry.lerp(a.padding, b.padding, t),
    preferBelow: t < 0.5 ? a.preferBelow : b.preferBelow,
    showDuration: t < 0.5 ? a.showDuration : b.showDuration,
    textStyle: TextStyle.lerp(a.textStyle, b.textStyle, t),
    verticalOffset: t < 0.5 ? a.verticalOffset : b.verticalOffset,
    waitDuration: t < 0.5 ? a.waitDuration : b.waitDuration,
  );
}