createGroup method

Future<V2TimValueCallback<String>> createGroup({
  1. String? groupID,
  2. required String groupType,
  3. required String groupName,
  4. String? notification,
  5. String? introduction,
  6. String? faceUrl,
  7. bool? isAllMuted,
  8. int? addOpt,
  9. List<Map>? memberList,
})

创建自定义群组(高级版本:可以指定初始的群成员)

参数

info	自定义群组信息,可以设置 groupID | groupType | groupName | notification | introduction | faceURL 字段
memberList	指定初始的群成员(直播群 AVChatRoom 不支持指定初始群成员,memberList 请传 null)

注意

其他限制请参考V2TIMManager.createGroup注释

Implementation

Future<V2TimValueCallback<String>> createGroup(
    {String? groupID,
    required String groupType,
    required String groupName,
    String? notification,
    String? introduction,
    String? faceUrl,
    bool? isAllMuted,
    int? addOpt,
    List<Map>? memberList}) async {
  return V2TimValueCallback<String>.fromJson(
    formatJson(
      await _channel.invokeMethod(
        "createGroup",
        buildParam(
          {
            "groupID": groupID,
            "groupType": groupType,
            "groupName": groupName,
            "notification": notification,
            "introduction": introduction,
            "faceUrl": faceUrl,
            "isAllMuted": isAllMuted,
            "addOpt": addOpt,
            "memberList": memberList,
          },
        ),
      ),
    ),
  );
}