Keep TextFields visible when keyboard comes up (#18291)
Fixes #10826. Also in this PR: If you focus a text field, scroll it out of view and then start typing it will scroll back into view.
This commit is contained in:
committed by
GitHub
parent
e713b3349a
commit
409007827b
@@ -20,6 +20,7 @@ void main() {
|
||||
expect(passwordField, findsOneWidget);
|
||||
|
||||
await tester.enterText(nameField, '');
|
||||
await tester.pumpAndSettle();
|
||||
// The submit button isn't initially visible. Drag it into view so that
|
||||
// it will see the tap.
|
||||
await tester.drag(nameField, const Offset(0.0, -1200.0));
|
||||
@@ -34,6 +35,7 @@ void main() {
|
||||
expect(find.text('Name is required.'), findsOneWidget);
|
||||
expect(find.text('Please enter only alphabetical characters.'), findsNothing);
|
||||
await tester.enterText(nameField, '#');
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
// Make the submit button visible again (by dragging the name field), so
|
||||
// it will see the tap.
|
||||
|
||||
Reference in New Issue
Block a user