withYear method

  1. @override
Jalali withYear(
  1. int year
)
override

changes year throws if year is null

Implementation

@override
Jalali withYear(int year) {
  ArgumentError.checkNotNull(year, 'year');

  if (year == this.year) {
    return this;
  } else {
    return Jalali(year, month, day);
  }
}