copyWith method
Returns a new Period with the given start
and end
values.
If start
or end
are not provided, the corresponding value of this
is used.
Implementation
Period copyWith({
DateTime? start,
DateTime? end,
}) {
return Period(
start: start ?? this.start,
end: end ?? this.end,
);
}