I want to filter the List by searching in the search bar but it does not work.
for (var map in offersList) {
if (map.containsKey("foodname")) {
if (map["foodname"] == query) {
setState(() {
offersList.clear();
offersList.add(map);
});
}
}
}