From e7fb724099ec26845b7a7447e5c8df86cd870746 Mon Sep 17 00:00:00 2001 From: horam-deriv <64075768+horam-deriv@users.noreply.github.com> Date: Mon, 13 May 2024 18:32:37 +0800 Subject: [PATCH] test adding keys to the list --- .../lib/src/helpers/widget_keys.dart | 6 ++++++ .../lib/src/presentation/widgets/language_selector.dart | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/deriv_language_selector/lib/src/helpers/widget_keys.dart b/packages/deriv_language_selector/lib/src/helpers/widget_keys.dart index ff761bdb3..756499852 100644 --- a/packages/deriv_language_selector/lib/src/helpers/widget_keys.dart +++ b/packages/deriv_language_selector/lib/src/helpers/widget_keys.dart @@ -11,4 +11,10 @@ class WidgetKeys { /// the language selector bottom sheet. static const Key languageSelectorBottomSheetTogglerKey = ValueKey('language_selector_bottom_sheet_toggler'); + + /// Key for [LanguageSelectorBottomSheetWidget] which is used for showing the + /// + /// the language selector bottom sheet. + static const Key languageSelectorBottomSheetKey = + ValueKey('language_selector_bottom_sheet'); } diff --git a/packages/deriv_language_selector/lib/src/presentation/widgets/language_selector.dart b/packages/deriv_language_selector/lib/src/presentation/widgets/language_selector.dart index c5b5beec2..867ba6e68 100644 --- a/packages/deriv_language_selector/lib/src/presentation/widgets/language_selector.dart +++ b/packages/deriv_language_selector/lib/src/presentation/widgets/language_selector.dart @@ -109,8 +109,11 @@ class LanguageSelector extends StatelessWidget { ); LanguageItemList _buildLanguageBottomSheet( - BuildContext context, LanguageState state) => + BuildContext context, + LanguageState state, + ) => LanguageItemList( + key: WidgetKeys.languageSelectorBottomSheetKey, package: usePackageFlags ? 'deriv_language_selector' : null, items: state.activeLanguages ..sort(