setPushTemplate method

Future<void> setPushTemplate(
  1. String pushTemplateName
)

Sets the template for offline push notifications.

Param pushTemplateName The push template name.

Throws A description of the exception. See ChatError.

Implementation

Future<void> setPushTemplate(String pushTemplateName) async {
  try {
    Map result = await platform_interface.Client.instance.pushManager
        .callNativeMethod(ChatMethodKeys.setPushTemplate, {
      "pushTemplateName": pushTemplateName,
    });
    ChatError.hasErrorFromResult(result);
  } catch (e) {
    rethrow;
  }
}