setLocaleCallBack property

(dynamic Function(BuildContext)?) setLocaleCallBack
final

Function called after choosing new current Locale (actually LocaleName).

Useful for LocaleSwitcher.grid - if you want to close popup window after new selection.

Only Required if: if you use easy_localization and locale_switcher (not needed for locale_switcher_dev), set up it like this:

  LocaleSwitcher.<any_constructor>(
    setLocaleCallBack: (context) => context.setLocale(LocaleSwitcher.localeBestMatch),
    ...

Implementation

final Function(BuildContext)? setLocaleCallBack;