From f41510dc4e54a8c15c58a4d7ca5ecc5c023b2285 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 21 Jun 2020 23:07:33 +0530 Subject: Implements node focus in/out --- lib/components/SearchableAppList.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/components') diff --git a/lib/components/SearchableAppList.dart b/lib/components/SearchableAppList.dart index d9c7a17..3ac0d25 100644 --- a/lib/components/SearchableAppList.dart +++ b/lib/components/SearchableAppList.dart @@ -51,6 +51,7 @@ class _SearchableAppListState extends State { child: TextField( enableSuggestions: false, controller: _inputController, + focusNode: widget.searchFieldFocus, decoration: InputDecoration( contentPadding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 8.0), hintStyle: TextStyle(color: Color(0x88D8DEE9)), @@ -77,8 +78,9 @@ class SearchableAppList extends StatefulWidget { List appList; void Function(Application) openApp; void Function(Application) openOptionsMenu; + FocusNode searchFieldFocus; - SearchableAppList({ this.appList, this.openApp, this.openOptionsMenu }): super(); + SearchableAppList({ this.appList, this.openApp, this.openOptionsMenu, this.searchFieldFocus }): super(); @override _SearchableAppListState createState() => _SearchableAppListState(); -- cgit v1.3.1