I am using TextFormField in my Flutter app, like in this snippet:
@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
children: <Widget>[
TextField(
decoration: InputDecoration(hintText: "TextField A"),
textInputAction: TextInputAction.next,
onSubmitted: (_) => FocusScope.of(context).nextFocus(), // move focus to next
),
TextField(
decoration: InputDecoration(hintText: "TextField B"),
textInputAction: TextInputAction.next,
onSubmitted: (_) => FocusScope.of(context).nextFocus(), // move focus to next
),
TextField(
decoration: InputDecoration(hintText: "TextField C"),
textInputAction: TextInputAction.done,
onSubmitted: (_) => FocusScope.of(context).unfocus(), // submit and hide keyboard
),
],
),
);
}
My problem is that whenever the next field is behind the keyboard, the keyboard just disappears instead of moving to the next focus...
This is a video of the problem:
https://www.youtube.com/watch?v=h-Cv2UpnHrY&feature=youtu.be
As you can see, my wanted behaviour is the focus to move from the email field to the address field, but instead the keyboard disappears and nothing happens.
How can I solve it?