setPublishingEnabled method Null safety

Future<void> setPublishingEnabled(
  1. {bool? microphone,
  2. bool? camera}
)

Implementation

Future<void> setPublishingEnabled({bool? microphone, bool? camera}) => updatePublishing(
      publishing: PublishingSettingsUpdate.set(
        microphone: microphone?.let(
          (enabled) => MicrophonePublishingSettingsUpdate.set(isPublishing: BoolUpdate.set(enabled)),
        ),
        camera: camera?.let((enabled) => CameraPublishingSettingsUpdate.set(isPublishing: BoolUpdate.set(enabled))),
      ),
    );