joinPublicGroup method
- String groupId
Joins a public group. The group style should be ChatGroupStyle.PublicOpenJoin.
Param groupId The ID of the public group to join.
Returns None.
Throws Exception description, see ChatError.
Implementation
Future<void> joinPublicGroup(
String groupId,
) async {
try {
Map req = {'groupId': groupId};
Map result = await platform_interface.Client.instance.groupManager
.callNativeMethod(ChatMethodKeys.joinPublicGroup, req);
ChatError.hasErrorFromResult(result);
} catch (e) {
rethrow;
}
}