Compare commits

..

No commits in common. "3315cf196122bf3da054aba934fde30889f0d573" and "6b53dc170d620d3e9f5ae517d20d128e01698890" have entirely different histories.

View File

@ -419,9 +419,7 @@ class _MyHomePageState extends State<ListItemMenu> {
readOnly: true, readOnly: true,
decoration: InputDecoration( decoration: InputDecoration(
border: OutlineInputBorder(), border: OutlineInputBorder(),
suffixIcon: datePicker.text.isEmpty suffixIcon: IconButton(
? null
: IconButton(
icon: const Icon(Icons.clear), icon: const Icon(Icons.clear),
onPressed: () async { onPressed: () async {
setState(() { setState(() {
@ -446,9 +444,7 @@ class _MyHomePageState extends State<ListItemMenu> {
decoration: InputDecoration( decoration: InputDecoration(
labelText: 'Search by geographical zone', labelText: 'Search by geographical zone',
border: OutlineInputBorder(), border: OutlineInputBorder(),
suffixIcon: inputGeo.text.isEmpty suffixIcon: IconButton(
? null
: IconButton(
icon: const Icon(Icons.clear), icon: const Icon(Icons.clear),
onPressed: () async { onPressed: () async {
SharedPreferences prefs = SharedPreferences prefs =
@ -457,12 +453,10 @@ class _MyHomePageState extends State<ListItemMenu> {
prefs.remove("city_long"); prefs.remove("city_long");
setState(() { setState(() {
inputGeo.clear(); // Clear the text field inputGeo.clear(); // Clear the text field
geographicalZone = geographicalZone = ''; // Reset the geographical zone state
''; // Reset the geographical zone state
suggestions.clear(); suggestions.clear();
showArrow = true; showArrow = true;
showInputSearch = showInputSearch = true; // Optionally clear suggestions
true; // Optionally clear suggestions
/// Clear the filtered posts /// Clear the filtered posts
}); });
fetchPostsByLocation(); fetchPostsByLocation();
@ -543,9 +537,7 @@ class _MyHomePageState extends State<ListItemMenu> {
decoration: InputDecoration( decoration: InputDecoration(
labelText: 'Search by item', labelText: 'Search by item',
border: OutlineInputBorder(), border: OutlineInputBorder(),
suffixIcon: inputItem.text.isEmpty suffixIcon: IconButton(
? null
: IconButton(
icon: const Icon(Icons.clear), icon: const Icon(Icons.clear),
onPressed: () { onPressed: () {
setState(() { setState(() {