showLanguagesSelectionBorderSheet static method

void showLanguagesSelectionBorderSheet(
  1. BuildContext context, {
  2. bool autoSave = true,
  3. VoidCallback? onChanged,
  4. bool withFlagImage = true,
  5. bool withCountryName = true,
})

Show border modal sheet with translation options

Implementation

static void showLanguagesSelectionBorderSheet(BuildContext context,
    {bool autoSave = true,
    VoidCallback? onChanged,
    bool withFlagImage = true,
    bool withCountryName = true}) {
  showQudsModalBorderSheet(
    context,
    (c) => QudsLanguagesListView(
      withFlagImage: withFlagImage,
      withCountryName: withCountryName,
      onChanged: () async {
        if (autoSave) {
          await QudsInteractiveApp.qudsAppController
              .saveStateInSharedPreferences();
        }
        onChanged?.call();
      },
    ),
    title: QudsProviderWatcher<QudsTranslationProvider>(
        builder: (p) => Padding(
            padding: const EdgeInsets.symmetric(vertical: 5),
            child: Text(
              'Select language'.tr,
              style: const TextStyle(fontSize: 18),
            ))),
  );
}