From 2be2c8fd50ed5e148b96a72b6e464454e71ed653 Mon Sep 17 00:00:00 2001 From: appflowy Date: Tue, 26 Oct 2021 12:55:08 +0800 Subject: [PATCH] [opti]: improve the scrolling performance by reducing the repaint area. --- lib/src/widgets/text_line.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/src/widgets/text_line.dart b/lib/src/widgets/text_line.dart index b295de24..c4b6cc17 100644 --- a/lib/src/widgets/text_line.dart +++ b/lib/src/widgets/text_line.dart @@ -579,6 +579,9 @@ class RenderEditableTextLine extends RenderEditableBox { return _getPosition(position, 1.5); } + @override + bool get isRepaintBoundary => true; + TextPosition? _getPosition(TextPosition textPosition, double dyScale) { assert(textPosition.offset < line.length); final offset = getOffsetForCaret(textPosition)