TabSelectionMemory class

Session memory of "which tab leads to which screen", learned when a tap on a tab item is followed by a screen change — the fallback that marks the active item of a custom tab row whose items all LOOK the same (so the visual odd-one-out has nothing to go on) and carry no Semantics(selected:).

Keys are screen-independent on purpose: stable IDs carry the screen slug, so the same tab has a different ID on every screen it is visible from. In memory only, never persisted or sent; small (capped) and cleared on logout / semantics release.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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.
inherited

Static Methods

clear() → void
Forget everything (logout / account switch / semantics release).
notePointerCancel(int pointer) → void
The pointer was cancelled (gesture arena / route change): no tap.
notePointerDown(int pointer, Offset position) → void
A user pointer went down at position (root logical px).
notePointerUp(int pointer, Offset position) → void
A user pointer lifted at position. Counts as a tap only when it stayed within kTouchSlop of its pointer-down — a drag or the end of a scroll that happens to lift over the nav bar is not a tab tap (but still clears a pending one, like any tap off a tab).
noteTap(Offset position) → void
A tap (user pointer-up or agent tap) at position, in root logical px. Remembered only when it lands on a tab item of the latest capture; a tap anywhere else clears any pending tab tap (the screen change that follows is that other tap's doing, not the tab's).
observe(String screen, List<TabRowInfo> rows) → void
Called by the normalizer once per capture of screen with the tab rows it found. Completes a pending tap's lesson when the screen has changed and the tapped row is still on screen.
rowKeyOf(List<String> textsLeftToRight) → String
selectedTabFor(String screen, String rowKey) → String?
The tab key learned for screen in the row rowKey, or null.
tabKeyOf(int index, String text) → String

Constants

maxScreens → const int
Screens remembered at most (oldest dropped first).
pendingWindow → const Duration
A tap must be followed by its screen change within this window.