lerp method

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

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

Implementation

@useResult
FScaffoldStyle lerp(FScaffoldStyle other, double t) => FScaffoldStyle(
  systemOverlayStyle: t < 0.5 ? systemOverlayStyle : other.systemOverlayStyle,
  backgroundColor: Color.lerp(backgroundColor, other.backgroundColor, t) ?? backgroundColor,
  sidebarBackgroundColor:
      Color.lerp(sidebarBackgroundColor, other.sidebarBackgroundColor, t) ?? sidebarBackgroundColor,
  childPadding: EdgeInsetsGeometry.lerp(childPadding, other.childPadding, t) ?? childPadding,
  headerDecoration: BoxDecoration.lerp(headerDecoration, other.headerDecoration, t) ?? headerDecoration,
  footerDecoration: BoxDecoration.lerp(footerDecoration, other.footerDecoration, t) ?? footerDecoration,
);