In Chapter 9 → building the popup menu for previous searches:
In the callback of
CustomDropdownMenuItem after we remove the item from the
previousSearches list we didn’t call
savePreviousSearches(); so the removed item will stay in the
shared_prefs, this seems incorrect for me, do I miss something?
I had the same question. As you mentioned in your question, I added
savePreviousSearches(); in the callback of
_buildSearchCard() in recipe_list.dart.
Now, after I remove an item and stop the app, and when I start it again, the list does not have the removed item.
Thanks for sharing !