GestureDetector(
onTap: () {
FocusManager.instance.primaryFocus?.unfocus();
},
child: Scaffold(
appBar: AppBar(
title: const Text('Close Keyboard Demo'),
backgroundColor: Color(0xff6ae792),
),
body: ...
),
);
Reference
https://www.flutterbeads.com/close-hide-keyboard-flutter/
3 Easy Steps to Close Keyboard in Flutter with Code (2022) - FlutterBeads
<span class="rt-reading-time" style="display: block;"><span class="rt-label rt-prefix"></span> <span class="rt-time">2</span> <span class="rt-label rt-postfix">min read</span></span> TextField is a very common widget in Flutter. When you click on the TextF
www.flutterbeads.com
728x90
'Flutter' 카테고리의 다른 글
| [Flutter] list add to first (0) | 2022.04.28 |
|---|---|
| [Flutter] restrict textfield input type & setting keyboard type (0) | 2022.04.28 |
| [Flutter] Textfield 속성 (0) | 2022.04.28 |
| [Flutter] flutter remove textfield underline (0) | 2022.04.28 |
| [Flutter] dart get index of list by item (0) | 2022.04.27 |