fetchPushConfigsFromServer method

Future<EMPushConfigs> fetchPushConfigsFromServer()

~english Gets the push configurations from the server. ~end

~chinese 从服务器获取推送设置信息。 ~end

Implementation

Future<EMPushConfigs> fetchPushConfigsFromServer() async {
  Map result = await PushChannel.invokeMethod(
      ChatMethodKeys.getImPushConfigFromServer);
  try {
    EMError.hasErrorFromResult(result);
    return EMPushConfigs.fromJson(
        result[ChatMethodKeys.getImPushConfigFromServer]);
  } on EMError catch (e) {
    throw e;
  }
}