scroll method

void scroll(
  1. ScrollAmount horizontalAmount,
  2. ScrollAmount verticalAmount
)

Scrolls the visible region of the content area horizontally and vertically.

Throws a WindowsException on failure.

To learn more, see learn.microsoft.com/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationscrollpattern-scroll.

Implementation

@pragma('vm:prefer-inline')
void scroll(ScrollAmount horizontalAmount, ScrollAmount verticalAmount) {
  final hr$ = HRESULT(_ScrollFn(ptr, horizontalAmount, verticalAmount));
  if (hr$.isError) throw WindowsException(hr$);
}