cardReviewedAtDateLength method Null safety

int cardReviewedAtDateLength(
  1. DateTime date
)

Implementation

int cardReviewedAtDateLength(DateTime date) {
  return _state!.cardStates.values.where((st) {
    final dueDate = calculateDueDate(st!);
    return dueDate == null ||
        dueDate.year == date.year &&
            dueDate.month == date.month &&
            dueDate.day == date.day;
  }).length;
}