ToastAnimation class

ToastAnimation defines animation styles for toast notifications. Use factory constructors to create different animation effects.

Constructors

ToastAnimation.bounceIn({Duration? duration})
Bounce scale animation that pops in. Best for centered, attention-grabbing notifications.
factory
ToastAnimation.bounceInFromBottom({Duration? duration})
Bounce in from bottom with elastic effect. Best for playful bottom notifications.
factory
ToastAnimation.bounceInFromTop({Duration? duration})
Bounce in from top with elastic effect. Best for playful, attention-grabbing notifications.
factory
ToastAnimation.fade({Duration? duration, Curve? curve})
Simple fade in/out animation. Best for subtle, non-intrusive notifications.
factory
ToastAnimation.fadeOut({Duration? duration})
Quick fade out. Pairs well with any entry animation.
factory
ToastAnimation.fadeRotate({Duration? duration, Curve? curve})
Combined fade and rotate animation. Best for creative/artistic interfaces.
factory
ToastAnimation.fadeScale({Duration? duration, Curve? curve})
Combined fade and scale animation. Best for prominent notifications.
factory
ToastAnimation.fadeShrinkOut({Duration? duration})
Fade and shrink simultaneously. Smooth, polished exit for any toast.
factory
ToastAnimation.none()
No animation
const
ToastAnimation.rotate({Duration? duration, Curve? curve})
Rotation animation. Best for playful/casual apps.
factory
ToastAnimation.scale({Duration? duration, Curve? curve})
Scale animation that grows from center. Best for attention-grabbing notifications.
factory
ToastAnimation.shrinkOut({Duration? duration})
Shrink down and disappear. Pairs with bounceIn / scale entries.
factory
ToastAnimation.slideFromBottom({Duration? duration, Curve? curve})
Slide from bottom of screen. Best for notifications positioned at bottom.
factory
ToastAnimation.slideFromBottomFade({Duration? duration, Curve? curve})
Slide from bottom with fade effect. Best for smooth bottom-positioned notifications.
factory
ToastAnimation.slideFromLeft({Duration? duration, Curve? curve})
Slide from left side of screen. Best for left-to-right reading flow.
factory
ToastAnimation.slideFromLeftFade({Duration? duration, Curve? curve})
Slide from left with fade effect. Best for smooth left-side entry.
factory
ToastAnimation.slideFromRight({Duration? duration, Curve? curve})
Slide from right side of screen. Best for right-to-left reading flow.
factory
ToastAnimation.slideFromRightFade({Duration? duration, Curve? curve})
Slide from right with fade effect. Best for smooth right-side entry.
factory
ToastAnimation.slideFromTop({Duration? duration, Curve? curve})
Slide from top of screen. Best for notifications positioned at top.
factory
ToastAnimation.slideFromTopFade({Duration? duration, Curve? curve})
Slide from top with fade effect. Best for smooth top-positioned notifications.
factory
ToastAnimation.slideOutBottom({Duration? duration, Curve? curve})
Slide out to the bottom of the screen. Pairs with springFromBottom / slideFromBottom entries.
factory
ToastAnimation.slideOutBottomFade({Duration? duration, Curve? curve})
Slide out to the bottom with a fade. Pairs with springFromBottom / slideFromBottomFade entries.
factory
ToastAnimation.slideOutLeft({Duration? duration, Curve? curve})
Slide out to the left. Pairs with slideFromLeft entries or for a swipe-away feel.
factory
ToastAnimation.slideOutRight({Duration? duration, Curve? curve})
Slide out to the right. Pairs with slideFromRight entries or for a swipe-away feel.
factory
ToastAnimation.slideOutTop({Duration? duration, Curve? curve})
Slide out to the top of the screen. Pairs with springFromTop / slideFromTop entries.
factory
ToastAnimation.slideOutTopFade({Duration? duration, Curve? curve})
Slide out to the top with a fade. Pairs with springFromTop / slideFromTopFade entries.
factory
ToastAnimation.snapOut({Duration? duration})
Snap out instantly with a brief scale-down. Best for urgent dismissals or quick transitions.
factory
ToastAnimation.springFromBottom({Duration? duration})
Spring animation from bottom with overshoot. Best for smooth but noticeable entry.
factory
ToastAnimation.springFromTop({Duration? duration})
Spring animation from top with overshoot. Best for smooth but noticeable entry.
factory

Properties

curve → Curve?
final
duration → Duration?
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → ToastAnimationType
final

Methods

copyWith({ToastAnimationType? type, Duration? duration, Curve? curve}) → ToastAnimation
Create a copy of this animation with overridden properties.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited