addShowOtherLocales method
Add special entry into SupportedLocaleNames.
You should make sure to handle this entry selection in your widget.
Implementation
// todo: {Null Function() onTap = ...}
void addShowOtherLocales({
String name = showOtherLocales,
Widget? flag,
// Function(BuildContext)? setLocaleCallBack,
}) {
locales.add(null);
names.add(showOtherLocales);
entries.add(
LocaleName(
name: names.last,
locale: locales.last,
flag: flag ?? flagForOtherLocales),
// setLocaleCallBack: setLocaleCallBack
);
}