LocaleSwitcher.grid constructor

const LocaleSwitcher.grid({
  1. Key? key,
  2. SliverGridDelegate? gridDelegate,
  3. int numberOfShown = 200,
  4. bool showOsLocale = true,
  5. dynamic setLocaleCallBack(
    1. BuildContext
    )?,
  6. int useNLettersInsteadOfIcon = 0,
  7. ShapeBorder? shape = const CircleBorder(eccentricity: 0),
  8. bool useEmoji = false,
  9. bool multiLangForceAll = false,
  10. MultiLangCountries multiLangCountries = MultiLangCountries.onlyFlag,
  11. MultiLangBuilder? multiLangWidget,
  12. double specialFlagsPadding = 0,
})

A Widget to switch locale of App with GridView.

Example: online app, example code - click on icon in AppBar to see this widget.

Implementation

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