copyWith method
Returns a copy of this with the updated units of time.
LocalDate(2023, 4, 15).copyWith(day: 20); // 2023-04-20
Implementation
@useResult LocalDate copyWith({int? year, int? month, int? day}) => LocalDate(
year ?? this.year,
month ?? this.month,
day ?? this.day,
);