onChangeLanguage property

void Function(String locale)? onChangeLanguage
final

Callback fired with the chosen locale code when the user picks a language from the manual picker. If null — or the project ships fewer than two locales, or dynamicLanguageEnabled is off — the "Change language" menu item is not displayed.

Implementation

final void Function(String locale)? onChangeLanguage;