ToastAnimation.springFromTop constructor

ToastAnimation.springFromTop({
  1. Duration? duration,
})

Spring animation from top with overshoot. Best for smooth but noticeable entry.

Implementation

factory ToastAnimation.springFromTop({Duration? duration}) {
  return ToastAnimation._(
    type: ToastAnimationType.slideFromTopFade,
    duration: duration ?? const Duration(milliseconds: 400),
    curve: Curves.easeOutBack,
  );
}