horizontalOffset property
Which part of the content inside the viewport should be visible in the horizontal axis.
The ViewportOffset.pixels value determines the scroll offset that the viewport uses to select which part of its content to display. As the user scrolls the viewport horizontally, this value changes, which changes the content that is displayed.
Typically a ScrollPosition.
Implementation
ViewportOffset get horizontalOffset => _horizontalOffset;
Implementation
set horizontalOffset(ViewportOffset value) {
if (_horizontalOffset == value) {
return;
}
if (attached) {
_horizontalOffset.removeListener(markNeedsLayout);
}
_horizontalOffset = value;
if (attached) {
_horizontalOffset.addListener(markNeedsLayout);
}
markNeedsLayout();
}