scrollForward method

void scrollForward()

Scroll the scoreboard forward.

This should only be called when the scoreboard is not already in its end scroll state (e.g., atEnd is false).

Implementation

void scrollForward() {
  _disposer.addDisposable(_domService.scheduleRead(() {
    _readElement();
    var newValue = _scrollingMove;
    assert(_buttonSize > 0);
    if (atStart) {
      if (newValue != null) {
        newValue -= _buttonSize;
      }
    }
    if (_scrollSize! + _transform < newValue! + _clientSize!) {
      newValue = _scrollSize! + _transform - _clientSize!;
    }
    if (_isVertical || !_isRtl) {
      _transform -= newValue;
    } else {
      _transform += newValue;
    }
    _updateTransform();
  }));
}