smoran38.dev
smoran38.dev

Reputation: 1

Close keyboard on a multi-line form (Pixel2)

Messing around with flutter and I must be missing it in the documentation somewhere because I'm not sure what this object or property is.

I am trying to use a multiline textformfield, and so to handle focus I've used

onTap: (){FocusScope.of(context).requestFocus(new FocusNode());},

What I've noticed is that I need to doubletap to reenter the form field now.

When I do double tap, I get this odd label/hint -- How can I remove or prevent it from showing?

Hint/Label?

Any info is appreciated :)

Edit: The reason I needed to double tap was because multi-line form fields switch the Pixel2 GO button to the newline button and prevents the user from exiting the keyboard cleanly.

Fixed by adding textInputAction: TextInputAction.go to the textformfield

Upvotes: 0

Views: 143

Answers (1)

McJezus
McJezus

Reputation: 40

If you just want to have the TextFormField work normally, you don't have to write your own onTap function. The built-in one works perfectly fine :)

Upvotes: 0

Related Questions