copy method

Date<T> copy({
  1. int? year,
  2. int? month,
  3. int? day,
})

creates a new Date but with the optional parameter overrides.

Implementation

Date<T> copy({int? year, int? month, int? day}) =>
    Date<T>(year ?? this.year, month ?? this.month, day ?? this.day);