Open suragch opened 3 years ago
Verified this on latest stable and issue persists.
cc @jason-simmons for followup on whether SkParagraph specifies consistency on this.
The test still fails on latest stable and master.
Expected: TextRange:<TextRange(start: -1, end: -1)>
Actual: TextRange:<TextRange(start: 11, end: 11)>
package:test_api expect
package:flutter_test/src/widget_tester.dart 460:16 expect
test/widget_test.dart 31:5 main.<fn>
/test/widget_test.dart:31
✖ word boundary for out-of-range offset returns empty range
If you supply an out-of-range offset to
Paragraph.getLineBoundary
, then the result isTextRange.empty
as expected. This is demonstrated with the following test:However if you do the same thing with
Paragraph.getWordBoundary
, the test fails. It returns a range from the end of the text to the offset. This isn't the behavior I expect, but is this intentional?Here is a test to demonstrate it:
This test fails:
Here is the relevant part of
flutter doctor -v
: