nextMonth method

int nextMonth(
  1. DateTime date
)

Returns a number of the next month.

Implementation

int nextMonth(DateTime date) {
  final month = date.month;
  return month == DateTime.monthsPerYear ? 1 : month + 1;
}