yearsFromNow method Null safety

DateTime yearsFromNow(
  1. int years

Return the point in time years from now on the same date.

If the current day of the month isn't valid in the new year, the nearest valid day in the original month will be used.


DateTime yearsFromNow(int years) => yearsAgo(-years);