diff --git a/covas_mobile/lib/pages/ListItemMenu.dart b/covas_mobile/lib/pages/ListItemMenu.dart index 49bdea1..87f23bf 100644 --- a/covas_mobile/lib/pages/ListItemMenu.dart +++ b/covas_mobile/lib/pages/ListItemMenu.dart @@ -268,6 +268,7 @@ class _MyHomePageState extends State { if (suggestions.isNotEmpty) { showArrow = false; showInputSearch = false; + showInputTag = false; } }); } else { @@ -468,6 +469,7 @@ class _MyHomePageState extends State { showInputSearch = true; // Optionally clear suggestions /// Clear the filtered posts + showInputTag = true; }); fetchPostsByLocation(); }, @@ -489,6 +491,7 @@ class _MyHomePageState extends State { suggestions.clear(); // Optionally clear suggestions showArrow = true; showInputSearch = true; + showInputTag = true; /// Clear the filted posts }); @@ -521,6 +524,7 @@ class _MyHomePageState extends State { suggestions.clear(); showArrow = true; showInputSearch = true; + showInputTag = true; }); SharedPreferences prefs = await SharedPreferences.getInstance(); @@ -553,11 +557,7 @@ class _MyHomePageState extends State { icon: const Icon(Icons.clear), onPressed: () { setState(() { - inputItem.clear(); - itemName = ''; // Reset the geographical zone state - suggestionsItem.clear(); - showDateFields = true; - showArrow = true; + inputTags.clear(); }); fetchPostsByLocation(); }, @@ -565,17 +565,9 @@ class _MyHomePageState extends State { ), onChanged: (value) { if (value.isNotEmpty) { - setState(() { - itemName = value; - searchSuggestionsByItem(value); - }); } else { setState(() { - showDateFields = true; - showArrow = true; // Optionally clear suggestions - inputItem.clear(); // Clear the text field - itemName = ''; // Reset the geographical zone state - suggestionsItem.clear(); + inputTags.clear(); // Clear the text field /// Clear the filted posts });