lerp static method

Implementation

static MenuStyle lerp(MenuStyle a, MenuStyle b, double t) {
  return MenuStyle(
    axis: t < 0.5 ? a.axis : b.axis,
    visualDensity: lerpIfNotNulls(a.visualDensity, b.visualDensity, t, lerpVisualDensity),
    vertMenuMinWidth: lerpIfNotNulls(a.vertMenuMinWidth, b.vertMenuMinWidth, t, lerpDouble),
    vertPadding: lerpIfNotNulls(a.vertPadding, b.vertPadding, t, lerpDouble),
    vertSubmenuMargin: lerpIfNotNulls(a.vertSubmenuMargin, b.vertSubmenuMargin, t, lerpDouble),
    horzSubmenuMargin: lerpIfNotNulls(a.horzSubmenuMargin, b.horzSubmenuMargin, t, lerpDouble),
    areaPadding: lerpIfNotNulls(a.areaPadding, b.areaPadding, t, lerpDouble),
    buttonMenuPadding: lerpIfNotNulls(a.buttonMenuPadding, b.buttonMenuPadding, t, lerpDouble),
    backgroundColor: lerpIfNotNulls(a.backgroundColor, b.backgroundColor, t, lerpColor),
    foregroundColor: lerpMenuItemProperties(a.foregroundColor, b.foregroundColor, t, lerpColor),
    elevation: lerpIfNotNulls(a.elevation, b.elevation, t, lerpDouble),
    textStyle: TextStyle.lerp(a.textStyle, b.textStyle, t),
    itemStyle: lerpIfNotNulls(a.itemStyle, b.itemStyle, t, MenuItemStyle.lerp),
    dividerStyle: lerpIfNotNulls(a.dividerStyle, b.dividerStyle, t, DividerThemeData.lerp),
    animationDuration: t < 0.5 ? a.animationDuration : b.animationDuration
  );
}