Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4bb89ac

Browse files
readme file updated
1 parent d9e69ed commit 4bb89ac

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

‎README.md‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
11
# Flutter Form with Focus Node
22

3-
A new Flutter project using Form(). This form uses focus node.
3+
A new Flutter project using `Form()`. This form uses `focusNode:`.
44

55
## Getting Started
66

7-
This is actually not a complete project, in this repository, I showed how to implement a form correctly with focus node.
7+
This is actually not a complete project, in this repository, I showed how to implement a form correctly with the focus node.
8+
9+
This project demonstrates how `TextFormFields()` communicate with each other, how to pass `FocusNode()` instance to any `TextFormFields()`. Also, it handles all active focus nodes by clicking dropdown menu.
10+
11+
Putting this on the dropdown will unfocus all active focus node.
12+
13+
```
14+
onChanged: (value) {
15+
setState(() {
16+
// Will unfocus other fields, otherwise after selecting
17+
// a value last active focus node will be focused
18+
FocusScope.of(context).requestFocus(new FocusNode());
19+
_selectedText = value;
20+
});
21+
},
22+
```
823

924

1025
## Preview

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /