addMonths method

DateTime addMonths(
  1. int months
)

Add months to a DateTime

Implementation

DateTime addMonths(int months) {
  if (this == null) throw Exception("DateTime is null");
  return DateTime(this!.year, this!.month + months, this!.day);
}