ViewportController class

Controller for Viewport.

Implemented types

Constructors

ViewportController({ViewportModel? initial})
Creates a viewport controller.

Properties

contentExtent int
Total content extent in rows.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
maxOffset int
Maximum scroll offset.
no setteroverride
model ViewportModel
Current immutable viewport model.
no setter
offset int
Current scroll offset in rows.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollPercent double
Scroll percentage in the range 0, 1.
no setteroverride
viewportExtent int
Visible viewport extent in rows.
no setteroverride
yOffset int
Vertical scroll offset in rows.
no setter

Methods

addListener(void listener()) → void
Adds a listener that fires when the scroll offset changes.
override
configure({int? width, int? height, int? gutter, bool? softWrap, bool? fillHeight, bool? showLineNumbers, bool? mouseWheelEnabled, int? mouseWheelDelta, int? horizontalStep, ViewportKeyMap? keyMap, Style? style}) → void
Applies viewport configuration values.
jumpTo(int offset) bool
Jumps to an absolute offset. Returns true if the offset changed.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeListener(void listener()) → void
Removes a previously added listener.
override
scrollBy(int delta) bool
Scrolls by a delta. Returns true if the offset changed.
override
scrollPane({required String separator, required ScrollbarChars chars}) ViewportScrollPane
Returns a reusable scroll-pane helper for scrollbar rendering/interaction.
setContent(String content) → void
Replaces viewport content text.
setSize(int width, int? height) → void
Updates viewport dimensions.
toString() String
A string representation of this object.
inherited
update(Msg msg) → (ViewportModel, Cmd?)
Forwards a message to the underlying ViewportModel.

Operators

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