MediasfuAnimations class
A comprehensive animation system for the modern MediaSFU UI.
Provides:
- Duration constants for consistent timing
- Curve presets for various motion types
- Spring physics configurations
- Stagger utilities for list animations
- Tween helpers for common transitions
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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
Static Properties
- bouncySpring → SpringDescription
-
Bouncy spring - for playful, elastic effects
no setter
-
Button press feedback configuration
no setter
- defaultSpring → SpringDescription
-
Default spring - balanced responsiveness
no setter
- gentleSpring → SpringDescription
-
Gentle spring - slow and smooth
no setter
- hoverScale → AnimationConfig
-
Hover scale configuration
no setter
- modalEnter → AnimationConfig
-
Modal enter transition configuration
no setter
- modalExit → AnimationConfig
-
Modal exit transition configuration
no setter
- pageEnter → AnimationConfig
-
Page enter transition configuration
no setter
- snappySpring → SpringDescription
-
Snappy spring - fast with slight overshoot
no setter
- stiffSpring → SpringDescription
-
Stiff spring - quick and controlled
no setter
- toastEnter → AnimationConfig
-
Toast notification enter configuration
no setter
Static Methods
-
cascadeIntervals(
int itemCount, {double staggerAmount = 0.1, Curve curve = Curves.easeOutCubic}) → List< Interval> - Creates a cascading stagger effect configuration.
-
createSpringSimulation(
{SpringDescription? spring, double start = 0.0, double end = 1.0, double velocity = 0.0}) → SpringSimulation - Creates a spring simulation for physics-based animations.
-
fadeIn(
AnimationController controller) → Animation< double> - Fade in animation
-
fadeOut(
AnimationController controller) → Animation< double> - Fade out animation
-
heartbeat(
AnimationController controller) → Animation< double> - Creates a heartbeat animation (two quick pulses).
-
pulse(
AnimationController controller, {double minScale = 1.0, double maxScale = 1.05}) → Animation< double> - Creates a pulsing animation for attention-grabbing effects.
-
rotate(
AnimationController controller, {double turns = 1.0}) → Animation< double> - Rotation animation
-
scaleDown(
AnimationController controller, {double from = 1.0, double to = 0.95}) → Animation< double> - Scale down animation
-
scaleUp(
AnimationController controller, {double from = 0.8, double to = 1.0}) → Animation< double> - Scale up animation (0.0 to 1.0)
-
shimmerAlignment(
AnimationController controller) → Animation< Alignment> - Creates a shimmer gradient animation alignment.
-
slideFromBottom(
AnimationController controller) → Animation< Offset> - Slide from bottom animation
-
slideFromLeft(
AnimationController controller) → Animation< Offset> - Slide from left animation
-
slideFromRight(
AnimationController controller) → Animation< Offset> - Slide from right animation
-
slideFromTop(
AnimationController controller) → Animation< Offset> - Slide from top animation
-
staggerDelay(
int index, {Duration baseDelay = const Duration(milliseconds: 50), Duration maxDelay = const Duration(milliseconds: 500)}) → Duration - Calculates stagger delay for list item animations.
-
staggerInterval(
int index, int totalItems, {double overlapRatio = 0.5}) → Interval - Calculates stagger interval for use with AnimationController.
Constants
- accelerate → const Curve
- Accelerate for outgoing elements
- anticipate → const Curve
- Anticipate - slight pullback before forward motion
- bounce → const Curve
- Bounce effect for playful elements
- cinematic → const Duration
- Cinematic - For hero animations and page transitions
- decelerate → const Curve
- Decelerate for incoming elements
- emphasizedEnter → const Curve
- Material Design emphasized curve for enter
- emphasizedExit → const Curve
- Material Design emphasized curve for exit
- fast → const Duration
- Fast - For micro-interactions (ripples, toggles)
- instant → const Duration
- Instant - For immediate feedback (hover states)
- linear → const Curve
- Linear for constant-speed animations (loading spinners)
- normal → const Duration
- Normal - Standard transitions (page changes, modal opens)
- overshoot → const Curve
- Overshoot for attention-grabbing animations
- slow → const Duration
- Slow - For emphasis or complex animations
- slower → const Duration
- Slower - For dramatic reveals
- smooth → const Curve
- Smooth ease for general purpose animations
- snappy → const Curve
- Snappy ease for responsive interactions