setSecret method
Implementation
Future<void> setSecret({
required String secretId,
required Uint8List data,
String? mimeType,
String? name,
String? delegatedTo,
String? forIdentity,
}) async {
final req = <String, dynamic>{
"secret_id": secretId,
if (mimeType != null) "type": mimeType,
if (name != null) "name": name,
if (delegatedTo != null) "delegated_to": delegatedTo,
if (forIdentity != null) "for_identity": forIdentity,
};
final res = await room.sendRequest("secrets.set_secret", req, data: data);
if (res is EmptyResponse || res is JsonResponse) {
return;
}
throw RoomServerException("Invalid response received, expected EmptyResponse or JsonResponse");
}