showSelectLanguageDialog function

Future<void> showSelectLanguageDialog(
  1. BuildContext context, {
  2. required AppTheme theme,
  3. required SupportLanguage language,
  4. bool dismissible = true,
  5. void onItemPressed(
    1. SupportLanguage
    )?,
})

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,
    ),
  );
}