mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Cache caret parameters (#38821)
This commit is contained in:
parent
b7abf56a0b
commit
9da68fcdaf
@ -782,6 +782,10 @@ class TextPainter {
|
||||
offset: rect != null ? Offset(rect.left, rect.top) : _emptyOffset,
|
||||
fullHeight: rect != null ? rect.bottom - rect.top : null,
|
||||
);
|
||||
|
||||
// Cache the input parameters to prevent repeat work later.
|
||||
_previousCaretPosition = position;
|
||||
_previousCaretPrototype = caretPrototype;
|
||||
}
|
||||
|
||||
/// Returns a list of rects that bound the given selection.
|
||||
|
Loading…
Reference in New Issue
Block a user