GradientFlowEffect class

An animation effect that creates a flowing gradient along the connection.

The gradient smoothly flows along the path, creating an elegant visual effect that shows direction and movement.

Example:

connection.animationEffect = GradientFlowEffect(
  colors: [Colors.blue, Colors.cyan, Colors.blue],
  speed: 1.0,
);
Implemented types
Available extensions

Constructors

GradientFlowEffect({List<Color>? colors, int speed = 1, double gradientLength = 0.25, double connectionOpacity = 1.0})
Creates a gradient flow animation effect.

Properties

colors List<Color>?
Colors for the gradient. If null, creates a gradient using the connection color.
final
connectionOpacity double
Opacity of the base connection outside the gradient (0.0 to 1.0) 1.0 = full opacity (no fading), 0.0 = invisible
final
gradientLength double
Length of the gradient.
final
hashCode int
The hash code for this object.
no setterinherited
isBuiltIn bool

Available on ConnectionEffect, provided by the ConnectionEffectExtension extension

Check if this is a built-in connection effect
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
speed int
Number of complete cycles per animation period (integer for seamless looping)
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paint(Canvas canvas, Path path, Paint basePaint, double animationValue) → void
Paints the animated connection effect on the canvas.
override
toString() String
A string representation of this object.
inherited

Operators

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