LocaleSwitcher.menu constructor

const LocaleSwitcher.menu({
  1. Key? key,
  2. String? title = 'Language:',
  3. int numberOfShown = 200,
  4. bool showOsLocale = true,
  5. int useNLettersInsteadOfIcon = 0,
  6. bool useEmoji = false,
  7. double? width = 250,
  8. bool showLeading = true,
  9. ShapeBorder? shape = const CircleBorder(eccentricity: 0),
  10. dynamic setLocaleCallBack(
    1. BuildContext
    )?,
  11. bool multiLangForceAll = false,
  12. MultiLangCountries multiLangCountries = MultiLangCountries.onlyFlag,
  13. MultiLangBuilder? multiLangWidget,
  14. double iconRadius = 38,
  15. double specialFlagsPadding = 0,
})

A Widget to switch locale of App with DropDownMenu.

Example: online app, example code.

Implementation

const LocaleSwitcher.menu({
  super.key,
  this.title = 'Language:',
  this.numberOfShown = 200,
  this.showOsLocale = true,
  this.useNLettersInsteadOfIcon = 0,
  this.useEmoji = false,
  this.width = 250,
  this.showLeading = true,
  this.shape = const CircleBorder(eccentricity: 0),
  this.setLocaleCallBack,
  this.multiLangForceAll = false,
  this.multiLangCountries = MultiLangCountries.onlyFlag,
  this.multiLangWidget,
  this.iconRadius = 38,
  this.specialFlagsPadding = 0,
})  : type = LocaleSwitcherType.menu,
      useStaticIcon = null,
      toolTipPrefix = null,
      gridDelegate = null,
      builder = null,
      assert(!useEmoji || (useEmoji == (useNLettersInsteadOfIcon == 0)));