DateTime getDate(DateTime date) { final results = markedDates.firstWhere((element) => element.date == date, orElse: () => MarkedDate(color: Colors.black, date: DateTime(0))); return results.date; }