LocaleSwitcher.toggle constructor

LocaleSwitcher.toggle(
  1. {Key? key,
  2. String? title = 'Choose language:',
  3. int numberOfShown = 4,
  4. bool showOsLocale = true,
  5. bool titlePositionTop = true,
  6. CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.stretch,
  7. EdgeInsets padding = const EdgeInsets.all(8),
  8. EdgeInsets titlePadding = const EdgeInsets.all(4)}
)

A Widget to switch locale of App with ToggleLanguageSwitch.

Implementation

factory LocaleSwitcher.toggle({
  Key? key,
  String? title = 'Choose language:',
  int numberOfShown = 4,
  bool showOsLocale = true,
  bool titlePositionTop = true,
  CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.stretch,
  EdgeInsets padding = const EdgeInsets.all(8),
  EdgeInsets titlePadding = const EdgeInsets.all(4),
}) {
  return LocaleSwitcher._(
    key: key,
    title: title,
    showOsLocale: showOsLocale,
    numberOfShown: numberOfShown,
    titlePositionTop: titlePositionTop,
    crossAxisAlignment: crossAxisAlignment,
    padding: padding,
    titlePadding: titlePadding,
    type: _Switcher.toggle,
  );
}