copyWith method

DateTimeRange copyWith({
  1. DateTime? start,
  2. DateTime? end,
})

Implementation

DateTimeRange copyWith({
  DateTime? start,
  DateTime? end,
}) {
  if ((start == null || identical(start, this.start)) &&
      (end == null || identical(end, this.end))) {
    return this;
  }
  return new DateTimeRange(
    start: start ?? this.start,
    end: end ?? this.end,
  );
}