Compare commits

..

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

View File

@ -419,17 +419,15 @@ class _MyHomePageState extends State<ListItemMenu> {
readOnly: true,
decoration: InputDecoration(
border: OutlineInputBorder(),
suffixIcon: datePicker.text.isEmpty
? null
: IconButton(
icon: const Icon(Icons.clear),
onPressed: () async {
setState(() {
datePicker.text = '';
});
fetchPostsByLocation();
},
),
suffixIcon: IconButton(
icon: const Icon(Icons.clear),
onPressed: () async {
setState(() {
datePicker.text = '';
});
fetchPostsByLocation();
},
),
hintText: hintText),
onTap: () =>
onTapFunctionDatePicker(context: context, position: position)),
@ -446,28 +444,24 @@ class _MyHomePageState extends State<ListItemMenu> {
decoration: InputDecoration(
labelText: 'Search by geographical zone',
border: OutlineInputBorder(),
suffixIcon: inputGeo.text.isEmpty
? null
: IconButton(
icon: const Icon(Icons.clear),
onPressed: () async {
SharedPreferences prefs =
await SharedPreferences.getInstance();
prefs.remove("city_lat");
prefs.remove("city_long");
setState(() {
inputGeo.clear(); // Clear the text field
geographicalZone =
''; // Reset the geographical zone state
suggestions.clear();
showArrow = true;
showInputSearch =
true; // Optionally clear suggestions
/// Clear the filtered posts
});
fetchPostsByLocation();
},
),
suffixIcon: IconButton(
icon: const Icon(Icons.clear),
onPressed: () async {
SharedPreferences prefs =
await SharedPreferences.getInstance();
prefs.remove("city_lat");
prefs.remove("city_long");
setState(() {
inputGeo.clear(); // Clear the text field
geographicalZone = ''; // Reset the geographical zone state
suggestions.clear();
showArrow = true;
showInputSearch = true; // Optionally clear suggestions
/// Clear the filtered posts
});
fetchPostsByLocation();
},
),
),
onChanged: (value) async {
if (value.isNotEmpty) {
@ -543,21 +537,19 @@ class _MyHomePageState extends State<ListItemMenu> {
decoration: InputDecoration(
labelText: 'Search by item',
border: OutlineInputBorder(),
suffixIcon: inputItem.text.isEmpty
? null
: IconButton(
icon: const Icon(Icons.clear),
onPressed: () {
setState(() {
inputItem.clear();
itemName = ''; // Reset the geographical zone state
suggestionsItem.clear();
showDateFields = true;
showArrow = true;
});
fetchPostsByLocation();
},
),
suffixIcon: IconButton(
icon: const Icon(Icons.clear),
onPressed: () {
setState(() {
inputItem.clear();
itemName = ''; // Reset the geographical zone state
suggestionsItem.clear();
showDateFields = true;
showArrow = true;
});
fetchPostsByLocation();
},
),
),
onChanged: (value) {
if (value.isNotEmpty) {