SlotEffect class

════════════════════════════════════════════════════════════════════════════ SLOT EFFECTS & TRANSITIONS ════════════════════════════════════════════════════════════════════════════ Visual effects for slot animations.

SlotEffect provides a composable system for defining visual transitions when signal values change. Effects can be combined using the bitwise OR operator (|) to create rich, layered animations.

Basic Effects

Effect Description
fade Opacity transition (0 → 1)
scale Size transition (small → normal)
slide Horizontal slide
slideUp Slide from bottom
slideDown Slide from top
slideLeft Slide from right
slideRight Slide from left
rotation Rotate during transition
flip 3D flip effect
blur Gaussian blur during transition

Dramatic Effects

Effect Description
bounce Bouncy overshoot animation
elastic Spring-like elastic effect
wobble Side-to-side wobble
pulse Attention-grabbing pulse
shake Quick shake effect
swing Pendulum-like swing

Combining Effects

// Single effect
effect: SlotEffect.fade

// Combined effects
effect: SlotEffect.fade | SlotEffect.scale | SlotEffect.blur

// Pre-combined effects
effect: SlotEffect.fadeScale
effect: SlotEffect.fadeSlideUp

Usage with AnimatedSlot

AnimatedSlot<int>(
  connect: controller.count,
  effect: SlotEffect.fadeScale | SlotEffect.blur,
  duration: Duration(milliseconds: 400),
  curve: Curves.easeOutBack,
  to: (ctx, val) => Text('$val', style: TextStyle(fontSize: 48)),
)

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

has(SlotEffect effect) bool
Check if effect contains another
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.
override
operator |(SlotEffect other) SlotEffect
Combine effects using | operator

Constants

blur → const SlotEffect
bounce → const SlotEffect
color → const SlotEffect
elastic → const SlotEffect
fade → const SlotEffect
fadeBlur → const SlotEffect
fadeScale → const SlotEffect
fadeSlide → const SlotEffect
fadeSlideDown → const SlotEffect
fadeSlideUp → const SlotEffect
flip → const SlotEffect
none → const SlotEffect
pulse → const SlotEffect
rotation → const SlotEffect
scale → const SlotEffect
scaleRotate → const SlotEffect
shake → const SlotEffect
slide → const SlotEffect
slideDown → const SlotEffect
slideLeft → const SlotEffect
slideRight → const SlotEffect
slideUp → const SlotEffect
swing → const SlotEffect
wobble → const SlotEffect