copyWith method

EntertainmentConfigurationChannel copyWith({
  1. int? channelId,
  2. EntertainmentConfigurationPosition? position,
  3. List<EntertainmentConfigurationChannelMember>? members,
  4. bool copyOriginalValues = true,
})

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

copyOriginalValues is true if you want to maintain the original object's initial values. This is useful if you plan on using this object in a PUT request.

Implementation

EntertainmentConfigurationChannel copyWith({
  int? channelId,
  EntertainmentConfigurationPosition? position,
  List<EntertainmentConfigurationChannelMember>? members,
  bool copyOriginalValues = true,
}) {
  return EntertainmentConfigurationChannel(
    channelId: channelId ?? this.channelId,
    position: position ??
        this.position.copyWith(copyOriginalValues: copyOriginalValues),
    members: members ??
        this
            .members
            .map((member) =>
                member.copyWith(copyOriginalValues: copyOriginalValues))
            .toList(),
  );
}