WidgetTester.enterText and TestTextInput.enterText are 2 methods 
used in tests to replace the content of the target text field. Prior 
to this change, WidgetTester.enterText and TestTextInput.enterText 
set the selection to an invalid range (-1, -1), indicating there’s 
no selection or caret. This contradicts the typical behavior of an
input field.

Description of change

In addition to replacing the text with the supplied text, 
WidgetTester.enterText and TestTextInput.enterText now set the 
selection to TextSelection.collapsed(offset: text.length), instead
of TextSelection.collapsed(offset: -1).

Migration guide

It should be very uncommon for tests to have to rely on the 
previous behavior of enterText, since usually the selection 
should not be invalid. Consider changing the expected values of 
your tests to adopt the enterText change.

Common test failures this change may introduce includes: