Unverified Commit 23d1ae0f authored by Greg Spencer's avatar Greg Spencer Committed by GitHub

Convert to TextPosition for getWordBoundary (#44611)

Convert the call to getWordBoundary to use a TextPosition, in preparation for landing flutter/engine#13727, which switches the desired API to the final desired API.
parent 86c91b12
......@@ -818,7 +818,7 @@ class TextPainter {
assert(!_needsLayout);
// TODO(gspencergoog): remove the List<int>-based code when the engine API
// returns a TextRange instead of a List<int>.
final dynamic boundary = _paragraph.getWordBoundary(position.offset);
final dynamic boundary = _paragraph.getWordBoundary(position);
if (boundary is List<int>) {
final List<int> indices = boundary;
return TextRange(start: indices[0], end: indices[1]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment