Flutter, Google Calendar API v3 https://pub.dartlang.org/packages/googleapis
Works:
Future<List<Event>> getEvents() =>
calendarApi.events.list("primary",
)
.then((Events events){
return events.items;
}).catchError((e){
print("error encountered");
print("${e.toString()}");
});
Doesn't work:
DateTime start = new DateTime.now().subtract(new Duration(days: 10));
DateTime end = new DateTime.now().add(new Duration(days: 10));
..
Future<List<Event>> getEvents() =>
calendarApi.events.list("primary",
timeMin: start,
timeMax: end,
)
.then((Events events){
return events.items;
}).catchError((e){
print("error encountered");
print("${e.toString()}");
});