enableEncryption abstract method
Enables or disables the built-in encryption.
After the user leaves the channel, the SDK automatically disables the built-in encryption. To enable the built-in encryption, call this method before the user joins the channel again.
enabled
Whether to enable built-in encryption: true : Enable the built-in encryption. false : (Default) Disable the built-in encryption.config
Built-in encryption configurations. See EncryptionConfig.
Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly.
Implementation
Future<void> enableEncryption(
{required bool enabled, required EncryptionConfig config});