setTopicInfo method
Implementation
Future<V2TimCallback> setTopicInfo({
required String groupID,
required V2TimTopicInfo topicInfo,
}) async {
try {
final res =
await wrappedPromiseToFuture(timeweb!.updateTopicProfile(mapToJSObj({
"groupID": groupID,
"topicID": topicInfo.topicID,
"topicName": topicInfo.topicName,
"avatar": topicInfo.topicFaceUrl,
"notification": topicInfo.notification,
"introduction": topicInfo.introduction,
"customData": topicInfo.customString,
"muteAllMembers": topicInfo.isAllMute,
"recvOpt": topicInfo.recvOpt,
})));
var code = res.code;
if (code == 0) {
return CommonUtils.returnSuccessWithDesc("update success");
} else {
return CommonUtils.returnError("createTopicInCommunity Failed");
}
} catch (error) {
return CommonUtils.returnError(error.toString());
}
}