File tree 1 file changed +32
-0
lines changed
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,38 @@ class _SearchBarState extends State<SearchBar> {
149
149
print ('$item ' );
150
150
});
151
151
}),
152
+ GFSearchBar (
153
+ // searchBoxInputDecoration: InputDecoration(
154
+ // enabledBorder: OutlineInputBorder(
155
+ // borderSide: BorderSide(
156
+ // color: Colors.teal,
157
+ // ),
158
+ // borderRadius: BorderRadius.circular(50)
159
+ // ),
160
+ // ),
161
+ searchList: list,
162
+ // hideSearchBoxWhenItemSelected: false,
163
+ // overlaySearchListHeight: 100.0,
164
+ searchQueryBuilder: (query, list) => list
165
+ .where ((item) =>
166
+ item.toLowerCase ().contains (query.toLowerCase ()))
167
+ .toList (),
168
+ overlaySearchListItemBuilder: (item) => Container (
169
+ padding: const EdgeInsets .all (8 ),
170
+ child: Text (
171
+ item,
172
+ style: const TextStyle (fontSize: 18 ),
173
+ ),
174
+ ),
175
+ // noItemsFoundWidget: Container(
176
+ // color: Colors.green,
177
+ // child: Text("no items found..."),
178
+ // ),
179
+ onItemSelected: (item) {
180
+ setState (() {
181
+ print ('selected item $item ' );
182
+ });
183
+ }),
152
184
],
153
185
),
154
186
),
You can’t perform that action at this time.
0 commit comments