fetchAnnouncementFromServer method
- 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.
Implementation
Future<String?> fetchAnnouncementFromServer(String groupId) async {
Map req = {'groupId': groupId};
Map result = await _channel.invokeMethod(
ChatMethodKeys.getGroupAnnouncementFromServer, req);
try {
ChatError.hasErrorFromResult(result);
return result[ChatMethodKeys.getGroupAnnouncementFromServer];
} on ChatError catch (e) {
throw e;
}
}