copyWith method

Producer copyWith({
  1. String? id,
  2. String? localId,
  3. bool? closed,
  4. RTCRtpSender? rtpSender,
  5. MediaStreamTrack? track,
  6. String? kind,
  7. RtpParameters? rtpParameters,
  8. bool? paused,
  9. int? maxSpatialLayer,
  10. bool? stopTracks,
  11. bool? disableTrackOnPause,
  12. bool? zeroRtpOnPause,
  13. Map<String, dynamic>? appData,
  14. EnhancedEventEmitter? observer,
  15. MediaStream? stream,
  16. String? source,
})

Implementation

Producer copyWith({
  String? id,
  String? localId,
  bool? closed,
  RTCRtpSender? rtpSender,
  MediaStreamTrack? track,
  String? kind,
  RtpParameters? rtpParameters,
  bool? paused,
  int? maxSpatialLayer,
  bool? stopTracks,
  bool? disableTrackOnPause,
  bool? zeroRtpOnPause,
  Map<String, dynamic>? appData,
  EnhancedEventEmitter? observer,
  MediaStream? stream,
  String? source,
}) {
  return Producer._copy(
    id: id ?? this.id,
    localId: localId ?? this.localId,
    closed: closed ?? this.closed,
    rtpSender: rtpSender ?? this.rtpSender,
    track: track ?? this.track,
    kind: kind ?? this.kind,
    rtpParameters: rtpParameters ?? this.rtpParameters,
    paused: paused ?? this.paused,
    maxSpatialLayer: maxSpatialLayer ?? this.maxSpatialLayer,
    stopTracks: stopTracks ?? this.stopTracks,
    disableTrackOnPause: disableTrackOnPause ?? this.disableTrackOnPause,
    zeroRtpOnPause: zeroRtpOnPause ?? this.zeroRtpOnPause,
    appData: appData ?? this.appData,
    observer: observer ?? this.observer,
    stream: stream ?? this.stream,
    source: source ?? this.source,
  );
}