LocaleSwitcher.iconButton constructor

const LocaleSwitcher.iconButton({
  1. Key? key,
  2. String? toolTipPrefix = 'Current language: ',
  3. bool useEmoji = false,
  4. String? title = 'Select language: ',
  5. Icon? useStaticIcon,
  6. double iconRadius = 32,
  7. int numberOfShown = 200,
  8. bool showOsLocale = true,
  9. int useNLettersInsteadOfIcon = 0,
  10. ShapeBorder? shape = const CircleBorder(eccentricity: 0),
  11. dynamic setLocaleCallBack(
    1. BuildContext
    )?,
  12. MultiLangCountries multiLangCountries = MultiLangCountries.auto,
  13. bool multiLangForceAll = false,
  14. MultiLangBuilder? multiLangWidget,
  15. double specialFlagsPadding = 0,
})

A Widget to switch locale of App with IconButton.

Example: online app, example code - it is an icon in AppBar.

In popup window will be displayed LocaleSwitcher.grid.

Implementation

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