fetchAnnouncementFromServer method

Future<String?> fetchAnnouncementFromServer(
  1. String groupId

Gets the group announcement from the server.

Group members can call this method.

Param groupId The group ID.

Return The group announcement.

Throws A description of the exception. See ChatError.


Future<String?> fetchAnnouncementFromServer(String groupId) async {
  Map req = {'groupId': groupId};
  Map result = await _channel.invokeMethod(
      ChatMethodKeys.getGroupAnnouncementFromServer, req);
  try {
    return result[ChatMethodKeys.getGroupAnnouncementFromServer];
  } on ChatError catch (e) {
    throw e;