updateDialog method
Implementation
Future<QBDialog?> updateDialog(String dialogId,
{List<int>? addUsers,
List<int>? removeUsers,
String? dialogName,
String? dialogPhoto,
Map<String, Object>? customData}) async {
Map<String, Object> data = Map();
data["dialogId"] = dialogId;
if (addUsers != null) {
data["addUsers"] = addUsers;
}
if (removeUsers != null) {
data["removeUsers"] = removeUsers;
}
if (dialogName != null) {
data["name"] = dialogName;
}
if (dialogPhoto != null) {
data["photo"] = dialogPhoto;
}
if (customData != null) {
data["customData"] = customData;
}
Map<Object?, Object?> map = await _chatModule.invokeMethod(UPDATE_DIALOG_METHOD, data);
QBDialog? updatedDialog = QBDialogMapper.mapToQBDialog(map);
return updatedDialog;
}