lerp method

ToggleButtonsThemeData lerp (
  1. ToggleButtonsThemeData a,
  2. ToggleButtonsThemeData b,
  3. double t
)

Linearly interpolate between two toggle buttons themes.

Implementation

static ToggleButtonsThemeData lerp(ToggleButtonsThemeData a, ToggleButtonsThemeData b, double t) {
  assert (t != null);
  if (a == null && b == null)
    return null;
  return ToggleButtonsThemeData(
    textStyle: TextStyle.lerp(a?.textStyle, b?.textStyle, t),
    constraints: BoxConstraints.lerp(a?.constraints, b?.constraints, t),
    color: Color.lerp(a?.color, b?.color, t),
    selectedColor: Color.lerp(a?.selectedColor, b?.selectedColor, t),
    disabledColor: Color.lerp(a?.disabledColor, b?.disabledColor, t),
    fillColor: Color.lerp(a?.fillColor, b?.fillColor, t),
    focusColor: Color.lerp(a?.focusColor, b?.focusColor, t),
    highlightColor: Color.lerp(a?.highlightColor, b?.highlightColor, t),
    hoverColor: Color.lerp(a?.hoverColor, b?.hoverColor, t),
    splashColor: Color.lerp(a?.splashColor, b?.splashColor, t),
    borderColor: Color.lerp(a?.borderColor, b?.borderColor, t),
    selectedBorderColor: Color.lerp(a?.selectedBorderColor, b?.selectedBorderColor, t),
    disabledBorderColor: Color.lerp(a?.disabledBorderColor, b?.disabledBorderColor, t),
    borderRadius: BorderRadius.lerp(a?.borderRadius, b?.borderRadius, t),
    borderWidth: lerpDouble(a?.borderWidth, b?.borderWidth, t),
  );
}