How do I change Text Input Action Button (return/enter key) on Keyboard in Flutter?

Question

Asked by creativecreatorormaybenot on April 30, 2018 (source).

In Android and iOS it is possible to change the enter/return key of the keyboard to e.g. a "Go" button (and other options).

illustration

On top, we can see the regular "Return" button on both systems, which is the one you get by default with no modifications in both Android & iOS native and Flutter.

Below that, there is another setting, again on both systems, which you can simply adjust in your native application. It is the "Go" button in this case.

Answer

Question answered by creativecreatorormaybenot (source).

The input action for a TextField (or TextFormField) can be specified like this (here, the Go button):

TextField(
  textInputAction: TextInputAction.go
  ...
)

List of all available input actions.

DART FLUTTER
SHARE: