Skip to content

Commit e2e4158

Browse files
Sandip KakadiyaSandip Kakadiya
Sandip Kakadiya
authored and
Sandip Kakadiya
committed
local check
1 parent baff42c commit e2e4158

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

lib/screens/searchbar/searchbar.dart

+32
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,38 @@ class _SearchBarState extends State<SearchBar> {
149149
print('$item');
150150
});
151151
}),
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+
}),
152184
],
153185
),
154186
),

0 commit comments

Comments
 (0)