fetchAnnouncementFromServer method
- String groupId
Gets the group announcement from the server.
Param groupId The group ID.
Returns The group announcement, returns null if failed.
Throws Exception description, see ChatError.
Implementation
Future<String?> fetchAnnouncementFromServer(String groupId) async {
try {
Map req = {'groupId': groupId};
Map result = await platform_interface.Client.instance.groupManager
.callNativeMethod(ChatMethodKeys.getGroupAnnouncementFromServer, req);
ChatError.hasErrorFromResult(result);
return result[ChatMethodKeys.getGroupAnnouncementFromServer];
} catch (e) {
rethrow;
}
}