didChangeLocales method
Called when the system tells the app that the user's locale has changed.
Implementation
// To override WidgetsBindingObserver.didChangeLocales()
void didChangeLocales(List<Locale>? locales) {
/// Called when the system tells the app that the user's locale has
/// changed. For example, if the user changes the system language
/// settings.
///
/// This method exposes notifications from [Window.onLocaleChanged].
// Record the triggered event
assert(() {
if (_debugPrintEvents) {
debugPrint(
'$_consoleLeadingLine didChangeLocales() in $_consoleClassName');
}
return true;
}());
}