getNextMonthDate function

dynamic getNextMonthDate(
  1. dynamic date
)

Returns the next month start date for the given date..

Implementation

dynamic getNextMonthDate(dynamic date) {
  if (date is HijriDateTime) {
    return date.month == 12
        ? HijriDateTime(date.year + 1, 01, 01)
        : HijriDateTime(date.year, date.month + 1, 1);
  }
  return date.month == 12
      ? DateTime(date.year + 1)
      : DateTime(date.year, date.month + 1);
}