setPushTemplate method

Future<void> setPushTemplate(
  1. String pushTemplateName
)

设置离线推送模板。

Param pushTemplateName 推送模板名称。

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

Implementation

Future<void> setPushTemplate(String pushTemplateName) async {
  Map result =
      await PushChannel.invokeMethod(ChatMethodKeys.setPushTemplate, {
    "pushTemplateName": pushTemplateName,
  });
  try {
    EMError.hasErrorFromResult(result);
  } on EMError catch (e) {
    throw e;
  }
}