void getCalendarEvents(DateTime t1,DateTime t2) async {
DateTime start = t1.subtract(new Duration(days: 10)).toUtc ();
DateTime end = t1.subtract(new Duration(days: 9)).toUtc ();
final authHeaders = await _currentUser.authHeaders;
final httpClient = new GoogleHttpClient(authHeaders);
CalendarApi calendarApi = CalendarApi(httpClient);
var calEvents = calendarApi.events.list("primary",timeMin: start,timeMax: end,);
calEvents.then((Events events) {
events.items.forEach((Event event) {print(event.summary);});
});
}
I get events in console so how i can display event on the mobile screen. I want to display event fields like "summary", "description", "location", "start", "end", etc.. on the mobile screen.