fix datetime

This commit is contained in:
Valentin CZERYBA 2024-11-11 11:46:42 +01:00
parent a427fc5edf
commit 76ab0aef48

View File

@ -84,7 +84,7 @@ class SearchDelegateExample extends SearchDelegate {
var accessToken = prefs.getString("access_token") ?? ""; var accessToken = prefs.getString("access_token") ?? "";
final List<Events> body = []; final List<Events> body = [];
if (accessToken.isNotEmpty) { if (accessToken.isNotEmpty) {
DateTime currentDate = new DateTime.now(); DateTime currentDate = DateTime.now();
var url = Uri.parse( var url = Uri.parse(
"${globals.api}/events/search?item=${query}&current_dateime=${currentDate.toString()}"); "${globals.api}/events/search?item=${query}&current_dateime=${currentDate.toString()}");
if (geoQuery.isNotEmpty) { if (geoQuery.isNotEmpty) {