[opti]: improve the scrolling performance by reducing the repaint area.

pull/430/head
appflowy 5 years ago
parent 00c749f71d
commit 2be2c8fd50
  1. 3
      lib/src/widgets/text_line.dart

@ -579,6 +579,9 @@ class RenderEditableTextLine extends RenderEditableBox {
return _getPosition(position, 1.5); return _getPosition(position, 1.5);
} }
@override
bool get isRepaintBoundary => true;
TextPosition? _getPosition(TextPosition textPosition, double dyScale) { TextPosition? _getPosition(TextPosition textPosition, double dyScale) {
assert(textPosition.offset < line.length); assert(textPosition.offset < line.length);
final offset = getOffsetForCaret(textPosition) final offset = getOffsetForCaret(textPosition)

Loading…
Cancel
Save