setPreferredNotificationLanguage method
- String languageCode
~english Sets the preferred language for push notifications.
Param languageCode
The language code.
Throws A description of the exception. See ChatError. ~end
~chinese 设置用户推送翻译语言。
Param languageCode
语言代码。
Throws 如果有异常会在此抛出,包括错误码和错误信息,详见 ChatError。 ~end
Implementation
Future<void> setPreferredNotificationLanguage(String languageCode) async {
Map req = {"code": languageCode};
Map result = await PushChannel.invokeMethod(
ChatMethodKeys.setPreferredNotificationLanguage,
req,
);
try {
ChatError.hasErrorFromResult(result);
} on ChatError catch (e) {
throw e;
}
}