gotoTop method

ViewportModel gotoTop()

Goes to the top of the content.

Implementation

ViewportModel gotoTop() {
  if (atTop) return this;
  final newModel = setYOffset(0);
  return newModel.copyWith(
    currentHighlightIndex: newModel._findNearestMatch(),
  );
}