LocaleSwitcher.segmentedButton constructor

const LocaleSwitcher.segmentedButton({
  1. Key? key,
  2. bool useEmoji = false,
  3. double? width,
  4. double iconRadius = 32,
  5. int numberOfShown = 4,
  6. bool showOsLocale = true,
  7. int useNLettersInsteadOfIcon = 0,
  8. ShapeBorder? shape,
  9. dynamic setLocaleCallBack(
    1. BuildContext
    )?,
  10. double specialFlagsPadding = 2,
  11. bool multiLangForceAll = false,
  12. MultiLangCountries multiLangCountries = MultiLangCountries.auto,
  13. MultiLangBuilder? multiLangWidget,
})

A Widget to switch locale of App with SegmentedButton.

Example: online app, example code .

Implementation

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