INNER CODE UNIT · Dart

x

fluttercandies/extended_text · lib/src/extended/text_overflow_mixin.dart:679

      final double x = overflowWidgetRect.width / 5;

      int start = _textPainter
          .getPositionForOffset(Offset(overflowWidgetRect.left - x,
              overflowWidgetRect.top + overflowWidgetSize.height / 2))
          .offset;
      int end = _textPainter
          .getPositionForOffset(Offset(overflowWidgetRect.right + x,
              overflowWidgetRect.top + overflowWidgetSize.height / 2))
          .offset;

      final List<ui.TextBox> rects = _textPainter.getBoxesForSelection(
        TextSelection(
          baseOffset: start,
          extentOffset: end,
        ),
        // boxHeightStyle: ui.BoxHeightStyle.max,
        // boxWidthStyle: ui.BoxWidthStyle.max,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…