fetchPreferredNotificationLanguage method
Gets the preferred language for push notifications.
Return The language code.
Throws A description of the exception. See ChatError.
Implementation
Future<String?> fetchPreferredNotificationLanguage() async {
try {
Map result = await platform_interface.Client.instance.pushManager.callNativeMethod(
ChatMethodKeys.fetchPreferredNotificationLanguage,
);
ChatError.hasErrorFromResult(result);
String? ret = result[ChatMethodKeys.fetchPreferredNotificationLanguage];
return ret;
} catch (e) {
rethrow;
}
}