createDialog method
Implementation
Future<QBDialog?> createDialog(int dialogType,
{List<int>? occupantsIds, String? dialogName, String? dialogPhoto, Map<String, Object>? customData}) async {
Map<String, Object> data = Map();
data["type"] = dialogType;
if (dialogName != null) {
data["name"] = dialogName;
}
if (occupantsIds != null) {
data["occupantsIds"] = occupantsIds;
}
if (dialogPhoto != null) {
data["photo"] = dialogPhoto;
}
if (customData != null) {
data["customData"] = customData;
}
Map<Object?, Object?> map = await _chatModule.invokeMethod(CREATE_DIALOG_METHOD, data);
QBDialog? createdDialog = QBDialogMapper.mapToQBDialog(map);
return createdDialog;
}