createGroup method
创建自定义群组(高级版本:可以指定初始的群成员)
参数
info 自定义群组信息,可以设置 groupID | groupType | groupName | notification | introduction | faceURL 字段
memberList 指定初始的群成员(直播群 AVChatRoom 不支持指定初始群成员,memberList 请传 null)
注意
其他限制请参考V2TIMManager.createGroup注释
isSupportTopic 仅对社群有效
Implementation
Future<V2TimValueCallback<String>> createGroup({
String? groupID,
required String groupType,
required String groupName,
String? notification,
String? introduction,
String? faceUrl,
bool? isAllMuted,
bool? isSupportTopic = false,
GroupAddOptTypeEnum? addOpt,
List<V2TimGroupMember>? memberList,
}) async {
// add a default number.
GroupAddOptTypeEnum addOptDefault = addOpt ??
(groupType == GroupType.AVChatRoom
? GroupAddOptTypeEnum.V2TIM_GROUP_ADD_ANY
: GroupAddOptTypeEnum.V2TIM_GROUP_ADD_AUTH);
return ImFlutterPlatform.instance.createGroup(
groupType: groupType,
groupName: groupName,
groupID: groupID,
notification: notification,
introduction: introduction,
faceUrl: faceUrl,
isAllMuted: isAllMuted,
addOpt: addOptDefault.index,
memberList: memberList,
isSupportTopic: isSupportTopic);
}