RevealEngine class

Counters for a character-by-character reveal.

Constructors

RevealEngine({double fadeSeconds = 0.25})
Creates an engine whose characters take fadeSeconds to finish their entrance.

Properties

fadeSeconds double
How long one character takes to finish its entrance.
final
hashCode int
The hash code for this object.
no setterinherited
revealed double
Characters revealed so far, fractional between characters.
no setter
revealedFloor int
Characters to show this frame.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tailStillFading bool
Whether the newest character is still playing its entrance.
no setter

Methods

beginFastForward() → void
Enters the end-of-stream catch-up.
caughtUp(int target) bool
Whether the reveal has caught up with target.
clearFastForward() → void
Leaves the catch-up because more text arrived after all.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
progressFor(int index) double
How far through its entrance the character at index is, 0 to 1.
reset() → void
Restarts from nothing — the text was replaced, not extended.
snapToEnd(int length) → void
Marks length characters revealed with no animation.
tick(double dt, int target, double charactersPerSecond) bool
Advances by dt seconds toward target characters at charactersPerSecond, adapting upward when behind.
toString() String
A string representation of this object.
inherited
truncateTo(int length) → void
Clamps the reveal when the source shrank to a prefix of itself.

Operators

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

Constants

fadeWindow → const int
How many characters can be mid-entrance at once.
fastForwardSeconds → const double
Window the remainder is revealed over once streaming has finished.
maxLagSeconds → const double
Longest the reveal may lag behind the text it has been given.