getFocusedDate function

DateTime getFocusedDate(
  1. int index,
  2. CalendarFormat calendarFormat
)

Get the focused date for the current index. params int index The index to get the date for. params CalendarFormat calendarFormat The calendar format.

Implementation

DateTime getFocusedDate(int index, CalendarFormat calendarFormat) {
  return DateTime.now().add(
    Duration(days: normalizePageIndex(index, calendarFormat)),
  );
}