Shimmer class
A soft band of light glides across the text in reading order while the letters under it lift a hair and settle — then the text rests until the next sweep. One clock drives both the sheen and the pop, so they never drift apart.
The band moves physically left→right for LTR text and right→left for RTL, so a Kurdish or Arabic label shimmers in its own reading order.
If you also import package:shimmer, hide one of the two Shimmers.
- Inheritance
-
- Object
- TextEffect
- Shimmer
Constructors
-
Shimmer({Color color = const Color(0xFFFFFFFF), List<
Color> ? colors, Duration period = const Duration(milliseconds: 3600), double rest = 0.5, double band = 0.18, double pop = 0.18, double intensity = 0.5, BlendMode blendMode = BlendMode.srcATop}) -
A sweep of
color(or the multi-stopcolors) everyperiod.const
Properties
- band → double
-
Half-width of the band as a fraction of the slice,
0.02..0.49.final - blendMode → BlendMode
-
BlendMode.srcATop tints the ink; BlendMode.srcIn replaces it.
final
- color → Color
-
A single feathered light. Ignored when colors is set.
final
-
colors
→ List<
Color> ? -
A multi-stop iridescent band flowed across the text.
final
- continuous → bool
-
True for effects that move on their own clock (shimmer, sparkle, float)
and need the host ticking while mounted.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setteroverride
- intensity → double
-
Peak sheen opacity, as a fraction of the colour's own alpha.
final
- motionOnly → bool
-
True for effects that are only motion — under reduced motion they are
skipped entirely. A gradient fill is not motion; a sparkle is.
no setterinherited
- period → Duration
-
One glide plus its rest.
final
- pop → double
-
Peak per-unit scale bump under the band (0.18 = +18%).
final
- rest → double
-
Fraction of each period spent at rest after the glide,
0..0.85.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
apply(
TextFrame frame, UnitSlice slice) → void -
Write this frame's poses, ink passes and decor for
sliceintoframe.override -
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
Static Methods
-
bandCenter(
double eased, double band, {required bool rtl}) → double -
Where the band centre is, as a fraction of the slice width, at eased
sweep progress
eased: off the reading-start edge at 0, off the far edge at 1. -
bandStops(
double p, double b) → List< double> -
The five stops of a feathered band centred at
pwith half-widthb: edge, shoulder, centre, shoulder, edge. bandProfile is the weight at each.
Constants
-
bandProfile
→ const List<
double> - The weight of the band at each of bandStops.