scrollIntoView method

void scrollIntoView(
  1. int line,
  2. int ch, {
  3. int? margin,
})

Scrolls the given position into view. The margin parameter is optional. When given, it indicates the amount of vertical pixels around the given area that should be made visible as well.

Implementation

void scrollIntoView(int line, int ch, {int? margin}) {
  if (margin != null) {
    callArgs('scrollIntoView', [
      JsObject.jsify({'line': line, 'ch': ch}),
      margin,
    ]);
  } else {
    callArgs('scrollIntoView', [
      JsObject.jsify({'line': line, 'ch': ch}),
    ]);
  }
}