setLiveInfo static method
Implementation
static Future<TUIActionCallback> setLiveInfo(String roomId,
{String? coverUrl,
List<int>? categoryList,
bool? isPublicVisible,
int? activityStatus}) {
String userData = Tools.generateUserData();
Completer<TUIActionCallback> completer = Completer();
_actionCallback2Future(userData, completer);
TUILiveInfo liveInfo = TUILiveInfo();
liveInfo.roomInfo.roomId = roomId;
int flag = 0;
if (coverUrl != null) {
flag |= TUILiveModifyFlag.coverUrl.value();
liveInfo.coverUrl = coverUrl;
}
if (categoryList != null) {
flag |= TUILiveModifyFlag.category.value();
liveInfo.categoryList = categoryList;
}
if (isPublicVisible != null) {
flag |= TUILiveModifyFlag.publish.value();
liveInfo.isPublicVisible = isPublicVisible;
}
if (activityStatus != null) {
flag |= TUILiveModifyFlag.activityStatus.value();
liveInfo.activityStatus = activityStatus;
}
_engineSDK.Dart_SetLiveInfo(
_liveListFFIPointer!,
Tools.string2PointerChar(json.encode(liveInfo.toJson())),
flag,
Tools.string2PointerChar(userData));
return completer.future;
}