setViewportOffset method
void
setViewportOffset(})
This method is used to set the offset of the viewport.
The 'animate' parameter is used to animate the transition to the new offset. The 'absolute' parameter is used to choose whether the offset is added to the the current offset or set as an absolute value. The 'isHandled' parameter is used to indicate whether
Implementation
void setViewportOffset(
Offset offset, {
bool animate = true,
bool absolute = false,
bool isHandled = false,
}) {
eventBus.emit(
ViewportOffsetEvent(
id: const Uuid().v4(),
absolute ? offset : _viewportOffset + offset,
animate: animate,
isHandled: isHandled,
),
);
}