티스토리 뷰

728x90

onChanged: input 칸의 내용이 바로바로 바뀔 때

onSubmitted: 키보드의 입력완료를 눌렀을 때

 

오른쪽 아래 체크 표시를 누르면 onSubmit된다.

 

 

 

 

그리고 textfield 말고 textformfield 라고 있네.. 

https://api.flutter.dev/flutter/material/TextFormField-class.html

 

TextFormField class - material library - Dart API

A FormField that contains a TextField. This is a convenience widget that wraps a TextField widget in a FormField. A Form ancestor is not required. The Form simply makes it easier to save, reset, or validate multiple fields at once. To use without a Form, p

api.flutter.dev

 

 

 

 

+ onEditingComplete

https://api.flutter.dev/flutter/material/TextField/onEditingComplete.html

 

onEditingComplete property - TextField class - material library - Dart API

VoidCallback? onEditingComplete final Called when the user submits editable content (e.g., user presses the "done" button on the keyboard). The default implementation of onEditingComplete executes 2 different behaviors based on the situation: When a comple

api.flutter.dev

 

onSubmit이랑 같이 작성자가 텍스트 입력을 완료하면 콜백이 실행되는데

다른 점은 textfield의 focus를 조작할 수 있다는 점이 다르다~

 

728x90
댓글
250x250
250x250
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/07   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
글 보관함