connections/animation/animation_effects library

Animation effects for connections.

This library provides a collection of built-in animation effects that can be applied to connections in a node flow diagram.

Available Effects

Usage Example

import 'package:vyuh_node_flow/connections/animation/animation_effects.dart';

// Apply a flowing dash effect
connection.animationEffect = FlowingDashEffect(
  speed: 2.0,
  dashLength: 10.0,
  gapLength: 5.0,
);

// Apply a particle effect
connection.animationEffect = ParticleEffect(
  particleCount: 5,
  particleSize: 4.0,
  speed: 1.5,
);

// Apply a gradient flow effect
connection.animationEffect = GradientFlowEffect(
  colors: [Colors.blue, Colors.cyan, Colors.blue],
  speed: 1.0,
);

// Apply a pulse effect
connection.animationEffect = PulseEffect(
  pulseSpeed: 1.0,
  minOpacity: 0.3,
  maxOpacity: 1.0,
  widthVariation: 1.5,
);

Custom Effects

You can create custom animation effects by extending ConnectionAnimationEffect:

class MyCustomEffect extends ConnectionAnimationEffect {
  @override
  void paint(Canvas canvas, Path path, Paint basePaint, double animationValue) {
    // Your custom animation rendering logic
  }
}

Classes

ArrowParticle
An arrow-shaped particle painter.
CharacterParticle
A character/emoji particle painter.
CircleParticle
A circular particle painter.
ConnectionAnimationEffect
Abstract interface for connection animation effects.
FlowingDashEffect
An animation effect that creates a flowing dash pattern along the connection.
GradientFlowEffect
An animation effect that creates a flowing gradient along the connection.
ParticleEffect
An animation effect that shows particles moving along the connection path.
ParticlePainter
Abstract interface for rendering particles in a ParticleEffect.
PulseEffect
An animation effect that creates a pulsing/glowing effect on the connection.