copyWith method
Creates a copy of date
but with the given fields
replaced with the new values.
Implementation
DateTime copyWith(DateTime date, {int? year, int? month, int? day, int? hour, int? minute, int? second, int? millisecond, int? microsecond}) => _date(
date.isUtc,
year ?? date.year,
month ?? date.month,
day ?? date.day,
hour ?? date.hour,
minute ?? date.minute,
second ?? date.second,
millisecond ?? date.millisecond,
microsecond ?? date.microsecond);