lerp static method

Implementation

static MenuItemStyle lerp(MenuItemStyle a, MenuItemStyle b, double t) {
  return MenuItemStyle(
    overlayColor: lerpMenuItemProperties(a.overlayColor, b.overlayColor, t, lerpColor),
    minHeight: lerpIfNotNulls(a.minHeight, b.minHeight, t, lerpDouble),
    padding: lerpIfNotNulls(a.padding, b.padding, t, EdgeInsetsDirectional.lerp),
    largeStartPadding: lerpIfNotNulls(a.largeStartPadding, b.largeStartPadding, t, lerpDouble),
    startPaddingStyle: t < 0.5 ? a.startPaddingStyle : b.startPaddingStyle,
    contentsVertSpacing: lerpIfNotNulls(a.contentsVertSpacing, b.contentsVertSpacing, t, lerpDouble),
    contentsMinHorzSpacing: lerpIfNotNulls(a.contentsMinHorzSpacing, b.contentsMinHorzSpacing, t, lerpDouble),
    shortcutLabelTextStyle: lerpIfNotNulls(a.shortcutLabelTextStyle, b.shortcutLabelTextStyle, t, TextStyle.lerp),
    arrowIconAsset: t < 0.5 ? a.arrowIconAsset : b.arrowIconAsset,
    arrowIconSize: lerpIfNotNulls(a.arrowIconSize, b.arrowIconSize, t, lerpDouble),
    iconStyle: lerpIfNotNulls(a.iconStyle, b.iconStyle, t, IconThemeData.lerp)
  );
}