From 0639633e9ecfe12562fd9f28ecbbc9c8516ab1db Mon Sep 17 00:00:00 2001 From: Marisha <37644117+SmallishBubbles@users.noreply.github.com> Date: Thu, 15 Jan 2026 12:36:34 -0800 Subject: [PATCH 1/3] Fix autofocus case in user-input.md autoFocus is not correct, the property is all in lowercase. Verified in https://docs.flutter.dev/cookbook/forms/focus --- src/content/learn/tutorial/user-input.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/content/learn/tutorial/user-input.md b/src/content/learn/tutorial/user-input.md index bdfbbac999..b11e9b2cff 100644 --- a/src/content/learn/tutorial/user-input.md +++ b/src/content/learn/tutorial/user-input.md @@ -319,7 +319,7 @@ And after the user enters a guess, the focus should stay in the `TextField` so they can enter their next guess. To resolve the first focus issue, -set up the `autoFocus` property on the `TextField`. +set up the `autofocus` property on the `TextField`. ```dart class GuessInput extends StatelessWidget { @@ -344,7 +344,7 @@ class GuessInput extends StatelessWidget { ), ), controller: _textEditingController, - autoFocus: true, // NEW + autofocus: true, // NEW onSubmitted: (String input) { print(input); // Temporary _textEditingController.clear(); @@ -411,7 +411,7 @@ class GuessInput extends StatelessWidget { ), ), controller: _textEditingController, - autoFocus: true, + autofocus: true, focusNode: _focusNode, // NEW onSubmitted: (String input) { print(input); // Temporary @@ -465,7 +465,7 @@ class GuessInput extends StatelessWidget { ), ), controller: _textEditingController, - autoFocus: true, + autofocus: true, focusNode: _focusNode, onSubmitted: (String input) { onSubmitGuess(_textEditingController.text.trim()); @@ -730,9 +730,9 @@ items: - text: "Call `TextField.focus()` directly." correct: false explanation: TextField doesn't have a focus method; you use a FocusNode. - - text: "Set the `autoFocus` property to true at runtime." + - text: "Set the `autofocus` property to true at runtime." correct: false - explanation: autoFocus only works on initial build, not for moving focus later. + explanation: autofocus only works on initial build, not for moving focus later. - text: "Use a FocusNode and call `requestFocus()` on it." correct: true explanation: "A FocusNode gives you control over focus, and calling `requestFocus()` moves focus to its associated widget." From e12edf143a6435871ce32f1d3274fdffafe48492 Mon Sep 17 00:00:00 2001 From: Shams Zakhour <44418985+sfshaza2@users.noreply.github.com> Date: Thu, 15 Jan 2026 13:35:17 -0800 Subject: [PATCH 2/3] Update src/content/learn/tutorial/user-input.md Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- src/content/learn/tutorial/user-input.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/learn/tutorial/user-input.md b/src/content/learn/tutorial/user-input.md index b11e9b2cff..a42d81f6ab 100644 --- a/src/content/learn/tutorial/user-input.md +++ b/src/content/learn/tutorial/user-input.md @@ -732,7 +732,7 @@ items: explanation: TextField doesn't have a focus method; you use a FocusNode. - text: "Set the `autofocus` property to true at runtime." correct: false - explanation: autofocus only works on initial build, not for moving focus later. + explanation: `autofocus` only works on initial build, not for moving focus later. - text: "Use a FocusNode and call `requestFocus()` on it." correct: true explanation: "A FocusNode gives you control over focus, and calling `requestFocus()` moves focus to its associated widget." From bea8ee4fe68e613d6d863b5d4767fcc675bb348d Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Fri, 16 Jan 2026 13:31:08 -0600 Subject: [PATCH 3/3] Undo problematic markdown syntax --- src/content/learn/tutorial/user-input.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/learn/tutorial/user-input.md b/src/content/learn/tutorial/user-input.md index a42d81f6ab..a07a880ab3 100644 --- a/src/content/learn/tutorial/user-input.md +++ b/src/content/learn/tutorial/user-input.md @@ -732,7 +732,7 @@ items: explanation: TextField doesn't have a focus method; you use a FocusNode. - text: "Set the `autofocus` property to true at runtime." correct: false - explanation: `autofocus` only works on initial build, not for moving focus later. + explanation: The 'autofocus' property only works on initial build, not for moving focus later. - text: "Use a FocusNode and call `requestFocus()` on it." correct: true explanation: "A FocusNode gives you control over focus, and calling `requestFocus()` moves focus to its associated widget."