DiscreteScrollController class

A controller for discrete cell-based scroll positions in TUI layouts.

Constructors

DiscreteScrollController({int initialScrollOffset = 0})
Creates a DiscreteScrollController with an optional initialScrollOffset.

Properties

hashCode int
The hash code for this object.
no setterinherited
maxScrollExtent int
The maximum valid scroll offset.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollOffset int
The current scroll offset in terminal lines/cells.
getter/setter pair
totalExtent int
The total content length in cells/lines.
getter/setter pair
viewportExtent int
The visible window length in cells/lines.
getter/setter pair

Methods

addListener(void listener()) → void
Add a listener to be notified when the scroll state changes.
dispose() → void
Clears all listeners.
jumpTo(int offset) → void
Instantly jump to the specified offset.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Notify all registered listeners.
removeListener(void listener()) → void
Remove a registered listener.
toString() String
A string representation of this object.
inherited

Operators

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