editRoom method Null safety
This allows you to modify the room description, secret, pin and whether it's private or not: you won't be able to modify other more static properties, like the room ID, the sampling rate, the extensions-related stuff and so on
Implementation
Future<dynamic> editRoom(String roomId,
{String? secret,
String? newDescription,
String? newSecret,
String? newPin,
String? newIsPrivate,
String? newRequirePvtId,
String? newBitrate,
String? newFirFreq,
int? newPublisher,
bool? newLockRecord,
Map? extras,
bool? permanent}) async {
var payload = {
"request": "edit",
"room": roomId,
...?extras,
if (secret != null) "secret": secret,
if (newDescription != null) "new_description": newDescription,
if (newSecret != null) "new_secret": newSecret,
if (newPin != null) "new_pin": newPin,
if (newIsPrivate != null) "new_is_private": newIsPrivate,
if (newRequirePvtId != null) "new_require_pvtid": newRequirePvtId,
if (newBitrate != null) "new_bitrate": newBitrate,
if (newFirFreq != null) "new_fir_freq": newFirFreq,
if (newPublisher != null) "new_publishers": newPublisher,
if (newLockRecord != null) "new_lock_record": newLockRecord,
if (permanent != null) "permanent": permanent
};
_handleRoomIdTypeDifference(payload);
return (await this.send(data: payload));
}