copyWith method
NullableDate
copyWith({
- ValueGetter<
int?> ? year, - ValueGetter<
int?> ? month, - ValueGetter<
int?> ? day,
Creates a copy with specified parts replaced.
Parameters:
year(ValueGetter<int?>?, optional): New year value.month(ValueGetter<int?>?, optional): New month value.day(ValueGetter<int?>?, optional): New day value.
Returns: A new NullableDate with updated parts.
Implementation
NullableDate copyWith({
ValueGetter<int?>? year,
ValueGetter<int?>? month,
ValueGetter<int?>? day,
}) {
return NullableDate(
year: year == null ? this.year : year(),
month: month == null ? this.month : month(),
day: day == null ? this.day : day(),
);
}