enableEncryption method
Implementation
Future<void> enableEncryption({int algorithmIndex = 0}) async {
if (encrypted) throw ('Encryption is already enabled!');
final algorithm = Client.supportedGroupEncryptionAlgorithms[algorithmIndex];
await client.setRoomStateWithKey(id, EventTypes.Encryption, '', {
'algorithm': algorithm,
});
return;
}