Add example showing how to move from one field to the next.#35926
Merged
gspencergoog merged 1 commit intoflutter:masterfrom Jul 11, 2019
Merged
Add example showing how to move from one field to the next.#35926gspencergoog merged 1 commit intoflutter:masterfrom
gspencergoog merged 1 commit intoflutter:masterfrom
Conversation
9135da0 to
2bba24f
Compare
zbarbuto
reviewed
Jul 11, 2019
| /// {@tool snippet --template=stateful_widget_material} | ||
| /// When a non-completion action is pressed, such as "next" or "previous", it | ||
| /// is often desirable to move the focus to the next or previous field. To do | ||
| /// this, handle it as in this example, by calling [FocusNode.focusNext] in |
There was a problem hiding this comment.
Shouldn't this be .nextFocus not .focusNext as per L713?
https://github.com/flutter/flutter/pull/35926/files#diff-2d74aabcc309c260810a6cca572e134eR713
Contributor
Author
There was a problem hiding this comment.
Yep, thanks for catching that! I'll fix it in another PR.
johnsonmh
pushed a commit
to johnsonmh/flutter
that referenced
this pull request
Jul 30, 2019
…35926) This adds an example of how to move to the "next" field when using TextInputAction.next. This is all that is needed to have "next field" functionality in a field. I thought about making it the default when handling the "next" or "previous" actions, but it's better that the developer has control over whether or not they actually move to the next field, and within which scope.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This adds an example of how to move to the "next" field when using
TextInputAction.next. This is all that is needed to have "next field" functionality in a field. I thought about making it the default when handling the "next" or "previous" actions, but it's better that the developer has control over whether or not they actually move to the next field, and within which scope.Related Issues
Fixes #11344
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?