From 23d1ae0ff73b2b907315f0a2bf06f0bc5cc5ee81 Mon Sep 17 00:00:00 2001 From: Greg Spencer Date: Mon, 11 Nov 2019 14:27:06 -0800 Subject: [PATCH] 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. --- packages/flutter/lib/src/painting/text_painter.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/painting/text_painter.dart b/packages/flutter/lib/src/painting/text_painter.dart index de2b779bd03..b6197a2503a 100644 --- a/packages/flutter/lib/src/painting/text_painter.dart +++ b/packages/flutter/lib/src/painting/text_painter.dart @@ -818,7 +818,7 @@ class TextPainter { assert(!_needsLayout); // TODO(gspencergoog): remove the List-based code when the engine API // returns a TextRange instead of a List. - final dynamic boundary = _paragraph.getWordBoundary(position.offset); + final dynamic boundary = _paragraph.getWordBoundary(position); if (boundary is List) { final List indices = boundary; return TextRange(start: indices[0], end: indices[1]);