lerp method

Interpolates between two styles for animated theme transitions.

Implementation

FdcGridToolbarStyle lerp(FdcGridToolbarStyle other, double t) {
  return FdcGridToolbarStyle(
    backgroundColor: Color.lerp(backgroundColor, other.backgroundColor, t),
    textStyle: TextStyle.lerp(textStyle, other.textStyle, t),
    itemTextColor: Color.lerp(itemTextColor, other.itemTextColor, t),
    itemIconColor: Color.lerp(itemIconColor, other.itemIconColor, t),
    disabledItemTextColor: Color.lerp(
      disabledItemTextColor,
      other.disabledItemTextColor,
      t,
    ),
    disabledItemIconColor: Color.lerp(
      disabledItemIconColor,
      other.disabledItemIconColor,
      t,
    ),
    height: lerpDouble(height, other.height, t),
    padding: EdgeInsetsGeometry.lerp(padding, other.padding, t),
    searchExpandedWidth: lerpDouble(
      searchExpandedWidth,
      other.searchExpandedWidth,
      t,
    ),
    searchFieldHeight: lerpDouble(
      searchFieldHeight,
      other.searchFieldHeight,
      t,
    ),
    searchFieldBorderRadius: lerpDouble(
      searchFieldBorderRadius,
      other.searchFieldBorderRadius,
      t,
    ),
    searchIconColor: Color.lerp(searchIconColor, other.searchIconColor, t),
    searchClearIconColor: Color.lerp(
      searchClearIconColor,
      other.searchClearIconColor,
      t,
    ),
    searchFieldFillColor: Color.lerp(
      searchFieldFillColor,
      other.searchFieldFillColor,
      t,
    ),
    searchFieldBorderColor: Color.lerp(
      searchFieldBorderColor,
      other.searchFieldBorderColor,
      t,
    ),
    searchFieldFocusedBorderColor: Color.lerp(
      searchFieldFocusedBorderColor,
      other.searchFieldFocusedBorderColor,
      t,
    ),
    searchFieldBorderWidth: lerpDouble(
      searchFieldBorderWidth,
      other.searchFieldBorderWidth,
      t,
    ),
    searchFieldFocusedBorderWidth: lerpDouble(
      searchFieldFocusedBorderWidth,
      other.searchFieldFocusedBorderWidth,
      t,
    ),
  );
}