fix current date

This commit is contained in:
Valentin CZERYBA 2024-11-11 11:52:21 +01:00
parent 76ab0aef48
commit 8b1db195d7

View File

@ -100,7 +100,7 @@ class _MyHomePageState extends State<ListItemMenu> {
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 currentDateTime = new DateTime.now(); DateTime currentDateTime = DateTime.now();
var url = Uri.parse( var url = Uri.parse(
"${globals.api}/events?current_datetime=${currentDateTime.toString()}"); "${globals.api}/events?current_datetime=${currentDateTime.toString()}");
final response = await http.get(url, headers: { final response = await http.get(url, headers: {