setLocalization method
The setLocalization method is used to set the desired localization for
notifications. It takes a required languageCode
parameter, which is an
optional, case-insensitive String that represents the language code for
the desired localization (e.g. "en" for English, "pt-br" for Brazilian
Portuguese, "es" for Spanish, etc.). If the languageCode
parameter is
null
or not provided, the default localization will be loaded from the
device system.
This method returns a Future that resolves to true
if the localization
was successfully set, or false
if the localization could not be set for
any reason (e.g. the specified language is not supported).
The translation value for the title or is defined on the parameter
Implementation
@override
Future<bool> setLocalization({required String? languageCode}) async {
var success = await methodChannel.invokeMethod(
CHANNEL_METHOD_SET_LOCALIZATION, languageCode);
return success;
}