showSelectLanguageDialog function
Future<void>
showSelectLanguageDialog(
- BuildContext context, {
- required AppTheme theme,
- required SupportLanguage language,
- bool dismissible = true,
- void onItemPressed()?,
Shows a language selection dialog.
theme
controls dialog styling.
language
is the current selected language.
onItemPressed
is a callback when a language is selected.
Implementation
Future<void> showSelectLanguageDialog(
BuildContext context, {
required AppTheme theme,
required SupportLanguage language,
bool dismissible = true,
void Function(SupportLanguage)? onItemPressed,
}) {
return showDialogWithAnimation(
barrierDismissible: dismissible,
context: context,
child: SelectLanguageDialog(
theme: theme,
language: language,
onItemPressed: onItemPressed,
),
);
}