Disable the input action button in the virtual keyboard when TextField is empty

This issue has been tracked since 2022-09-22.

Use case

I'd like to disable the search button in the virtual keyboard when the TextField is empty:

Proposal

On iOS, this can be implemented via enablesReturnKeyAutomatically.

huycozy wrote this answer on 2022-09-23

Hi @ryanheise, thanks for filing the issue.
I see there are some similar open issues addressing the case you described #93915, #30331
Closing this issue as a duplicate, so please follow up on these issues for further updates. You can leave there your comment and react an upvote to the original comment will help to raise the issue. Thank you!

ryanheise wrote this answer on 2022-09-23

This feature request is unrelated to #30331 because changing the button label dynamically is a different goal from disabling the button.

As for #93915 , that issue has a different and broader objective of being able to dynamically disable/enable the button at any time, which I'm not sure is even permitted by iOS. Rather, the native iOS API only allows you to follow a single preset behaviour of disabling the button when the text field is empty, and then automatically enabling it when you start typing. See the iOS documentation linked above. My feature request is specifically for that feature.

If I'm wrong, please let me know (i.e. which native API makes #93915 possible). But if #93915 is not actually possible, this present issue still is possible. If we close that issue, then this one should remain open.

huycozy wrote this answer on 2022-09-23

Hi @ryanheise
The reason I bring up the above 2 issues is that I am not sure if a feature when implemented will combine automation and disable/enable together.

With what you described above, I think it matches what the OP of issue #93915 is describing, please see #93915 (comment). It would be better if similar issues were solved in only one issue, so please leave a comment there for your thoughts and react an upvote to the original comment will help to raise the issue. It will make that issue clearer when implemented.

If you disagree, please write in the comments and I will reopen this issue and continue the discussion. Thanks!

ryanheise wrote this answer on 2022-09-23

As before, I don't think #93915 is actually possible. Please correct me if I'm wrong.

More Details About Repo
Owner Name flutter
Repo Name flutter
Full Name flutter/flutter
Language Dart
Created Date 2015-03-06
Updated Date 2022-09-30
Star Count 145381
Watcher Count 3565
Fork Count 23363
Issue Count 11208

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date