scrollToPosition method

  1. @override
void scrollToPosition(
  1. int newPosition
)
inherited

Scrolls the scrollbar into the new position.

Calling this may cause reflow, and should be done only in a batched domWrite block or DomService's updateLayout callbacks.

Implementation

@override
void scrollToPosition(int newPosition) {
  _window.scrollTo(_window.scrollX, newPosition);
  stickyController!.syncOnScroll();
}