getGroupAnnouncementFromServer method Null safety

  1. @Deprecated("Switch to using fetchAnnouncementFromServer instead.")
Future<String?> getGroupAnnouncementFromServer(
  1. String groupId
)
@Deprecated("Switch to using fetchAnnouncementFromServer instead.")

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 {@link EMError}.

Implementation

@Deprecated("Switch to using fetchAnnouncementFromServer instead.")
Future<String?> getGroupAnnouncementFromServer(String groupId) async {
  Map req = {'groupId': groupId};
  Map result = await _channel.invokeMethod(
      ChatMethodKeys.getGroupAnnouncementFromServer, req);
  try {
    EMError.hasErrorFromResult(result);
    return result[ChatMethodKeys.getGroupAnnouncementFromServer];
  } on EMError catch (e) {
    throw e;
  }
}