"<p>In this video, we are going to learn how to use the flutter calendar widget to count the number of events(tasks) that occur on a given day.</p> <p>The task is : Count Task by day and show results within our Calendar Widget</p> <p>Here is the code we wrote in our <strong>TaskModel.dart</strong>:</p> <pre> <code>int countTasksByDate(DateTime _datetime) =>   _todoTasks.where((task) => task.deadline.day== _datetime.day && task.deadline.month== _datetime.month && task.deadline.year== _datetime.year)   .length;</code></pre> <p> </p>"