getPushTemplate method

Future<String?> getPushTemplate()

~english Gets the template for offline push notifications.

Return The push template name.

Throws A description of the exception. See EMError. ~end

~chinese 获取推送模板名称。

Return 推送模板名称。

Throws 如果有异常会在此抛出,包括错误码和错误信息,详见 EMError。 ~end

Implementation

Future<String?> getPushTemplate() async {
  Map result = await PushChannel.invokeMethod(ChatMethodKeys.getPushTemplate);
  try {
    EMError.hasErrorFromResult(result);
    String? ret = result[ChatMethodKeys.getPushTemplate];
    return ret;
  } on EMError catch (e) {
    throw e;
  }
}