setLanguage method

Future<void> setLanguage(
  1. String? language
)

Sets the provided language as a preferred localization of the push notifications.

Implementation

Future<void> setLanguage(String? language) async {
  Log.debug('setLanguage($language) from $_language', '$runtimeType');

  if (_language != language) {
    _language = language;

    if (_token != null || _apns != null || _voip != null) {
      await _unregisterPushDevice();
      await _registerPushDevice();
    }
  }
}