INNER CODE UNIT · Dart

half

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

        final double half = math.max(
            (totalWidth - (right - left)) / 2, overflowWidgetSize.width * 2);

        left = left - half;
        right = right + half;

        if (left < 0) {
          right -= left;
          left = 0;
        }
        final double maxIntrinsicWidth = oneLineTextPainter.width;
        if (right > maxIntrinsicWidth) {
          left -= right - maxIntrinsicWidth;
          right = maxIntrinsicWidth;
        }

        final _TextRange estimatedRange = _TextRange(
          ExtendedTextLibraryUtils.convertTextPainterPostionToTextInputPostion(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…