lerp method

  1. @override
M3EButtonTheme lerp(
  1. M3EButtonTheme? other,
  2. double t
)
override

Linearly interpolates between this theme and other.

Implementation

@override
M3EButtonTheme lerp(M3EButtonTheme? other, double t) {
  if (other is! M3EButtonTheme) {
    return this;
  }
  return M3EButtonTheme(
    focusRingWidth: _lerpDouble(focusRingWidth, other.focusRingWidth, t)!,
    focusRingGap: _lerpDouble(focusRingGap, other.focusRingGap, t)!,
    minWidthFloor: _lerpDouble(minWidthFloor, other.minWidthFloor, t)!,
    dividerHeight: _lerpDouble(dividerHeight, other.dividerHeight, t)!,
    connectedInnerRadius: _lerpDouble(
      connectedInnerRadius,
      other.connectedInnerRadius,
      t,
    )!,
    connectedPressedInnerRadius: _lerpDouble(
      connectedPressedInnerRadius,
      other.connectedPressedInnerRadius,
      t,
    )!,
  );
}