ToastAnimation.slideOutTop constructor

ToastAnimation.slideOutTop({
  1. Duration? duration,
  2. Curve? curve,
})

Slide out to the top of the screen. Pairs with springFromTop / slideFromTop entries.

Implementation

factory ToastAnimation.slideOutTop({Duration? duration, Curve? curve}) {
  return ToastAnimation._(
    type: ToastAnimationType.slideFromTop,
    duration: duration ?? const Duration(milliseconds: 300),
    curve: curve ?? Curves.easeInBack,
  );
}