copyWith method

BusinessOpeningHours copyWith({
  1. String? timeZoneId,
  2. List<BusinessOpeningHoursInterval>? openingHours,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

BusinessOpeningHours copyWith({
  String? timeZoneId,
  List<BusinessOpeningHoursInterval>? openingHours,
}) =>
    BusinessOpeningHours(
      timeZoneId: timeZoneId ?? this.timeZoneId,
      openingHours: openingHours ?? this.openingHours,
    );