INNER CODE UNIT · Dart

startIndex

reqable/re-editor · lib/src/_code_field.dart:1058

        startIndex = min(((target - paddingTop) / _preferredLineHeight).ceil(), _codes.length - 1);
      }
      _displayParagraphs.addAll(_buildDisplayRenderParagraphs(startIndex, effectiveWidth));
    } else {
      if (_codes.length <= _displayParagraphs.first.index) {
        _displayParagraphs.clear();
        _updateDisplayRenderParagraphs(cycle + 1);
        return;
      }
      if (target < _displayParagraphs.first.top) {
        int startIndex = 0;
        double delta = 0;
        double offset = _displayParagraphs.first.top;
        for (int i = _displayParagraphs.first.index - 1; i >= 0; i--) {
          final IParagraph paragraph = _buildParagraph(i, effectiveWidth);
          delta += paragraph.height - _preferredLineHeight;
          offset -= paragraph.height;
          if (target >= offset) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…