lerp method

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

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

Implementation

@useResult
FToastMotion lerp(FToastMotion other, double t) => FToastMotion(
  entranceDuration: t < 0.5 ? entranceDuration : other.entranceDuration,
  dismissDuration: t < 0.5 ? dismissDuration : other.dismissDuration,
  transitionDuration: t < 0.5 ? transitionDuration : other.transitionDuration,
  reentranceDuration: t < 0.5 ? reentranceDuration : other.reentranceDuration,
  exitDuration: t < 0.5 ? exitDuration : other.exitDuration,
  swipeCompletionDuration: t < 0.5 ? swipeCompletionDuration : other.swipeCompletionDuration,
  entranceCurve: t < 0.5 ? entranceCurve : other.entranceCurve,
  dismissCurve: t < 0.5 ? dismissCurve : other.dismissCurve,
  transitionCurve: t < 0.5 ? transitionCurve : other.transitionCurve,
  reentranceCurve: t < 0.5 ? reentranceCurve : other.reentranceCurve,
  exitCurve: t < 0.5 ? exitCurve : other.exitCurve,
  swipeCompletionCurve: t < 0.5 ? swipeCompletionCurve : other.swipeCompletionCurve,
  entranceDismissFadeTween: t < 0.5 ? entranceDismissFadeTween : other.entranceDismissFadeTween,
);