copyWith method

MediaDevicesState copyWith({
  1. List<MediaDeviceInfo>? audioInputs,
  2. List<MediaDeviceInfo>? audioOutputs,
  3. List<MediaDeviceInfo>? videoInputs,
  4. MediaDeviceInfo? selectedAudioInput,
  5. MediaDeviceInfo? selectedAudioOutput,
  6. MediaDeviceInfo? selectedVideoInput,
})

Implementation

MediaDevicesState copyWith({
  List<MediaDeviceInfo>? audioInputs,
  List<MediaDeviceInfo>? audioOutputs,
  List<MediaDeviceInfo>? videoInputs,
  MediaDeviceInfo? selectedAudioInput,
  MediaDeviceInfo? selectedAudioOutput,
  MediaDeviceInfo? selectedVideoInput,
}) {
  return MediaDevicesState(
    audioInputs: audioInputs != null ? audioInputs : List<MediaDeviceInfo>.of(this.audioInputs),
    audioOutputs: audioOutputs != null ? audioOutputs : List<MediaDeviceInfo>.of(this.audioOutputs),
    videoInputs: videoInputs != null ? videoInputs : List<MediaDeviceInfo>.of(this.videoInputs),
    selectedAudioInput: selectedAudioInput != null ? selectedAudioInput : this.selectedAudioInput,
    selectedAudioOutput: selectedAudioOutput != null ? selectedAudioOutput : this.selectedAudioOutput,
    selectedVideoInput: selectedVideoInput != null ? selectedVideoInput : this.selectedVideoInput,
  );
}