added unfocus when tapping outside textfield
This commit is contained in:
parent
42574583ed
commit
339d402422
@ -108,11 +108,7 @@ class _ChatViewState extends State<ChatView> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
body: GestureDetector(
|
body: Container(
|
||||||
onTap: () {
|
|
||||||
FocusScope.of(context).requestFocus(FocusNode());
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: const AssetImage('assets/background/chat.png'),
|
image: const AssetImage('assets/background/chat.png'),
|
||||||
@ -141,7 +137,6 @@ class _ChatViewState extends State<ChatView> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -156,6 +156,9 @@ class _ChatTextfieldState extends State<ChatTextfield> {
|
|||||||
}
|
}
|
||||||
setDraft(text);
|
setDraft(text);
|
||||||
},
|
},
|
||||||
|
onTapOutside: (PointerDownEvent event) {
|
||||||
|
FocusScope.of(context).requestFocus(FocusNode());
|
||||||
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 15),
|
const SizedBox(width: 15),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user