lerp method

  1. @override
SlideSpec lerp(
  1. covariant SlideSpec? other,
  2. double t
)
override

Linearly interpolate with another Spec object.

Implementation

@override
SlideSpec lerp(
  SlideSpec? other,
  double t,
) {
  if (other == null) return this;

  return SlideSpec(
    headline1: headline1?.lerp(other.headline1, t),
    headline2: headline2?.lerp(other.headline2, t),
    headline3: headline3?.lerp(other.headline3, t),
    headline4: headline4?.lerp(other.headline4, t),
    headline5: headline5?.lerp(other.headline5, t),
    headline6: headline6?.lerp(other.headline6, t),
    paragraph: paragraph?.lerp(other.paragraph, t),
    link: TextStyle.lerp(link, other.link, t),
    blockSpacing: lerpDouble(blockSpacing, other.blockSpacing, t),
    divider: divider?.lerp(other.divider, t),
    list: list?.lerp(other.list, t),
    blockquote: blockquote?.lerp(other.blockquote, t),
    table: table?.lerp(other.table, t),
    code: code?.lerp(other.code, t),
    innerContainer: _innerContainer?.lerp(other._innerContainer, t),
    outerContainer: _outerContainer?.lerp(other._outerContainer, t),
    contentContainer: _contentContainer?.lerp(other._contentContainer, t),
    image: _image?.lerp(other._image, t),
  );
}