createGroup method Null safety
- @Deprecated('Simple group creation is deprecated since 3.6.0, please use advanced group creation under groupManager, this interface will be removed in future versions')
@Deprecated('Simple group creation is deprecated since 3.6.0, please use advanced group creation under groupManager, this interface will be removed in future versions')
Create a group
Parameter
groupType group type, we have predefined four common group types for you, you can also define the group type you need in the console:
"Work" : work group, with a maximum membership of 200 people , does not support active joining by users, and requires others to invite to join the group, suitable for work groups like WeChat (corresponding to the old version of Private groups).
"Public" : a public group with a maximum number of 2000 members. Anyone can apply to join the group, but adding a group requires the approval of the group owner or administrator. It is suitable for interest groups managed by the group owner like in QQ .
"Meeting" : Meeting group, the maximum number of members is 6000, anyone can enter and exit freely, and adding a group does not need to be approved, suitable for scenarios such as video conferencing and online training (corresponding to the old version of ChatRoom group) .
"AVChatRoom" : Live broadcast group, unlimited number of people, anyone can enter and exit freely, and the message throughput is large, suitable for use as a high-concurrency barrage chat room in live broadcast scenarios.
groupID Custom group ID, null can be passed. When null is passed, the system will automatically assign the groupID and return it through callback.
groupName Group name, cannot be null.
Note:
Creating two groups with the same groupID under the same SDKAPPID is not supported
Implementation
@Deprecated('Simple group creation is deprecated since 3.6.0, please use advanced group creation under groupManager, this interface will be removed in future versions')
Future<V2TimValueCallback<String> > createGroup({
required String groupType,
required String groupName,
String? groupID,
}) async {
return ImFlutterPlatform.instance.createGroup(
groupType: groupType, groupName: groupName, groupID: groupID);
}