From 2fd395a21a3b82ecfe558c82accde8a5f51d69ea Mon Sep 17 00:00:00 2001 From: appflowy <86001920+appflowy@users.noreply.github.com> Date: Tue, 26 Oct 2021 13:20:54 +0800 Subject: [PATCH] Improve the scrolling performance by reducing the repaint areas (#430) --- 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)