copyWith method

EntertainmentSegmentCapabilities copyWith({
  1. bool? isConfigurable,
  2. int? maxSegments,
  3. List<EntertainmentSegment>? segments,
})

Returns a copy of this object with its field values replaced by the ones provided to this method.

Implementation

EntertainmentSegmentCapabilities copyWith({
  bool? isConfigurable,
  int? maxSegments,
  List<EntertainmentSegment>? segments,
}) {
  return EntertainmentSegmentCapabilities(
    isConfigurable: isConfigurable ?? this.isConfigurable,
    maxSegments: maxSegments ?? this.maxSegments,
    segments: segments ??
        this.segments.map((segment) => segment.copyWith()).toList(),
  );
}