FollowMode class final
The per-viewport follow state (gh-1439): live (auto-follow on) ⇄
held (user scrolled up; output appended to the model, viewport
anchored) with a counted unseen delta while held.
Immutable: every transition returns a new instance. Value equality so
reactive hosts (Flutter setState gates) can compare cheaply.
Constructors
- FollowMode.held({int unseen = 0})
-
The held state: the user scrolled up;
unseenoutput units have arrived since.const - FollowMode.live()
-
The boot/resume state: auto-follow at the newest record (AC5).
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- isHeld → bool
-
Whether the user scrolled away from the live edge (auto-follow off).
final
- isLive → bool
-
Whether the viewport auto-follows the stream.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- unseen → int
-
Output units that arrived while held (viewport withheld them;
the model kept everything — zero loss, AC4). Never negative.
final
Methods
-
appended(
int count) → FollowMode - Output appended while the viewport stands in this state: counted when held (the affordance's live counter), invisible when live (the viewport shows it — today's behavior, REG-pinned).
-
jumpToLive(
) → FollowMode - The explicit re-engage (End key / jump chip / pill tap / wheel to the bottom): exactly one action, live again, count flushed.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
userScrolled(
{required int distanceFromLiveEdge, required int armExtent}) → FollowMode -
Classifies a USER scroll landing
distanceFromLiveEdgeunits from the live edge, witharmExtentthe near-bottom re-arm band (0 = exact-edge re-arm only). Position-governed — the standard chat heuristic:
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
nearBottomArmExtent(
int viewportExtent) → int -
The near-bottom re-arm band for a
viewportExtent(px in the app, rows in the TUI): ~10% of the extent, floored at one unit so tiny viewports still re-arm. A zero/negative extent yields zero — no band, exact-edge re-arm only, never a crash.
Constants
- nearBottomArmFraction → const double
- Near-bottom re-arm band as a fraction of the viewport extent (gh-1439 open question 1: shared fraction, leaning ~10%). One band for every surface so the catch-up gesture feels the same everywhere.