GestureDectector to clear keyboard

This commit is contained in:
andrei 2021-11-03 18:55:51 -04:00
parent a7f4838ce9
commit 5bb8060a95
1 changed files with 68 additions and 65 deletions

View File

@ -53,7 +53,9 @@ class _CheckList extends State<CheckList> {
@override
Widget build(BuildContext context) {
// TODO: implement build
return Scaffold(
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
child: Scaffold(
appBar: AppBar(
title: Text((listData != null) ? listData!.name : 'Check List: $id'),
actions: (listData != null && listData!.isTemplate! && !_editable)
@ -92,8 +94,8 @@ class _CheckList extends State<CheckList> {
),
controlAffinity: ListTileControlAffinity.leading,
value: list[index].value,
onChanged:
(listData != null && (!listData!.isTemplate! || _editable))
onChanged: (listData != null &&
(!listData!.isTemplate! || _editable))
? ((value) {
_updateItem(list[index]);
setState(() {
@ -120,6 +122,7 @@ class _CheckList extends State<CheckList> {
tooltip: "Add Item",
),
floatingActionButtonLocation: FloatingActionButtonLocation.endFloat,
),
);
}
}