Compare commits
No commits in common. "eadf07177b99c2f1b3823d65928d12c36f85b971" and "8d8c30f506c9767328ec2119599beba4836afd79" have entirely different histories.
eadf07177b
...
8d8c30f506
@ -14,7 +14,6 @@ import '../variable/globals.dart' as globals;
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import "Camera.dart";
|
||||
import 'package:camera/camera.dart';
|
||||
import 'package:textfield_tags/textfield_tags.dart';
|
||||
|
||||
void main() {
|
||||
initializeDateFormatting("fr_FR", null).then((_) => runApp(const MyApp()));
|
||||
@ -51,7 +50,6 @@ class _MyHomePageState extends State<ListItemMenu> {
|
||||
TextEditingController startDatepicker = TextEditingController();
|
||||
TextEditingController endDatepicker = TextEditingController();
|
||||
TextEditingController inputItem = TextEditingController();
|
||||
TextEditingController inputTags = TextEditingController();
|
||||
|
||||
bool showDateFields = false; // State to toggle date fields
|
||||
bool showArrow = true;
|
||||
@ -535,56 +533,6 @@ class _MyHomePageState extends State<ListItemMenu> {
|
||||
);
|
||||
}
|
||||
|
||||
Padding _buildTagsField() {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
children: [
|
||||
TextField(
|
||||
controller: inputTags,
|
||||
decoration: InputDecoration(
|
||||
labelText: 'Search by tags',
|
||||
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();
|
||||
},
|
||||
),
|
||||
),
|
||||
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();
|
||||
|
||||
/// Clear the filted posts
|
||||
});
|
||||
fetchPostsByLocation();
|
||||
}
|
||||
}),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Padding _buildItemZoneSearchField() {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
@ -619,11 +567,11 @@ class _MyHomePageState extends State<ListItemMenu> {
|
||||
});
|
||||
} else {
|
||||
setState(() {
|
||||
showDateFields = true;
|
||||
showArrow = true; // Optionally clear suggestions
|
||||
inputItem.clear(); // Clear the text field
|
||||
itemName = ''; // Reset the geographical zone state
|
||||
suggestionsItem.clear();
|
||||
showDateFields = true;
|
||||
showArrow = true; // Optionally clear suggestions
|
||||
|
||||
/// Clear the filted posts
|
||||
});
|
||||
@ -685,7 +633,6 @@ class _MyHomePageState extends State<ListItemMenu> {
|
||||
Flexible(child: _buildDateField("start")),
|
||||
Flexible(child: _buildDateField("end"))
|
||||
]),
|
||||
if ((showDateFields) && (showArrow)) _buildTagsField(),
|
||||
if (showDateFields) _buildGeographicalZoneSearchField(),
|
||||
if (showArrow)
|
||||
IconButton(
|
||||
|
Loading…
x
Reference in New Issue
Block a user