HighlightEffect class

Sweeps a background highlight color behind each character.

Characters are highlighted sequentially with the given highlightColor, fading from opacityFrom to opacityTo for a marker-like effect.

Inheritance

Constructors

HighlightEffect({Duration duration = const Duration(milliseconds: 800), Curve curve = Curves.easeInOut, Color highlightColor = Colors.yellow, double opacityFrom = 0.0, double opacityTo = 0.6, Duration delayBetweenChars = const Duration(milliseconds: 40)})
Creates a highlight sweep animation.
const

Properties

curve Curve
Curve applied to the animation timing for easing.
finalinherited
delayBetweenChars Duration
Delay between each successive character's animation start.
finalinherited
duration Duration
Total duration of one full animation cycle for a single character.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
highlightColor Color
Background color used for the highlight.
final
opacityFrom double
Starting opacity of the highlight.
final
opacityTo double
Peak opacity of the highlight.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

applyCurve(double t) double
Applies the effect's curve to a linear value t (0.0–1.0).
inherited
getAnimations(double progress, int charCount) List<CharacterAnimation>
Generates per-character background color sweeps.
override
getTotalDuration(int charCount) Duration
Returns the total duration needed to animate all charCount characters.
inherited
noise(int index, [int offset = 0]) double
Returns a deterministic pseudo-random value (0.0–1.0) for the given index and optional offset.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
staggeredProgress(double globalProgress, int index, int charCount) double
Computes the per-character progress for staggered animations.
inherited
toString() String
A string representation of this object.
inherited

Operators

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