setPushTemplate method
- String pushTemplateName
~english Sets the template for offline push notifications.
Param pushTemplateName The push template name.
Throws A description of the exception. See EMError. ~end
~chinese 设置离线推送模板。
Param pushTemplateName 推送模板名称。
Throws 如果有异常会在此抛出,包括错误码和错误信息,详见 EMError。 ~end
Implementation
Future<void> setPushTemplate(String pushTemplateName) async {
try {
Map result = await Client.instance.pushManager
.callNativeMethod(ChatMethodKeys.setPushTemplate, {
"pushTemplateName": pushTemplateName,
});
EMError.hasErrorFromResult(result);
} catch (e) {
rethrow;
}
}