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 lift, so they never drift apart.
The band starts where the text ITSELF starts reading: right to left over a Kurdish or Arabic label, left to right over an English one, whatever the page's direction. origin turns it: from the far end, from a physical edge, out from the middle, or in from both edges.
Each letter under the band is lifted whole — the tail of a ڕ and the V
beneath it rise with their letter.
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, SweepOrigin origin = SweepOrigin.reading}) -
A sweep of
color(or the multi-stopcolors) everyperiod.const - Shimmer.rainbow({Color? seed, int steps = 7, Duration period = const Duration(milliseconds: 3200), double rest = 0.4, double band = 0.32, double pop = 0.14, double intensity = 0.9, SweepOrigin origin = SweepOrigin.reading})
-
A band that runs through every hue — rainbowColors from
seed— for a celebration, a reward, a "you did it".factory
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, its last colour leading whichever way the
band runs.
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
- origin → SweepOrigin
-
Where the band starts.
final
- period → Duration
-
One glide plus its rest.
final
- pop → double
-
Peak per-unit scale bump under the band (0.18 = +18%), grown from the
baseline so a letter lifts rather than swells.
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.