isMaximumMonthDateReached static method

bool isMaximumMonthDateReached({
  1. required DateTime maxSelectableDate,
  2. required DateTime currentDate,
})

Checks if maximum month has been reached.

Returns true if the year and month of currentDate is equal or higher then year and month of maxSelectableDate.

Implementation

static bool isMaximumMonthDateReached({
  required DateTime maxSelectableDate,
  required DateTime currentDate,
}) {
  return currentDate.year >= maxSelectableDate.year &&
      currentDate.month >= maxSelectableDate.month;
}