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