lerp method

  1. @useResult
FSidebarStyle lerp(
  1. FSidebarStyle other,
  2. double t
)

Linearly interpolate between this and another FSidebarStyle using the given factor t.

Implementation

@useResult
FSidebarStyle lerp(FSidebarStyle other, double t) => .new(
  decoration: .lerp(decoration, other.decoration, t) ?? decoration,
  backgroundFilter: t < 0.5 ? backgroundFilter : other.backgroundFilter,
  constraints: .lerp(constraints, other.constraints, t) ?? constraints,
  groupStyle: groupStyle.lerp(other.groupStyle, t),
  headerPadding: .lerp(headerPadding, other.headerPadding, t) ?? headerPadding,
  contentPadding: .lerp(contentPadding, other.contentPadding, t) ?? contentPadding,
  footerPadding: .lerp(footerPadding, other.footerPadding, t) ?? footerPadding,
);