INNER CODE UNIT · Dart

upParagraph

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

    IParagraph? upParagraph = findDisplayParagraphByLineIndex(position.index - 1)?.paragraph;
    if (upParagraph == null) {
      if (position.index > 0) {
        upParagraph = _buildParagraph(position.index - 1);
      } else {
        return null;
      }
    }
    return CodeLinePosition.from(
      index: position.index - 1,
      position: upParagraph.getPosition(Offset(offset.dx, upParagraph.height - upParagraph.preferredLineHeight))
    );
  }

  CodeLinePosition? getDownPosition(CodeLinePosition position) {
    final CodeLineRenderParagraph? paragraph = findDisplayParagraphByLineIndex(position.index);
    if (paragraph == null) {
      return null;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…